Source-based and residence-based capital income taxation in open economies