LONDON (Reuters) - Apple's ability to shelter billions of dollars of income from tax has depended on an unusual loophole in the Irish tax code that helps the country compete with other countries for investment and jobs.