Technological Opportunity, Technological Leadership Change, and Latecomers’ R&D Resource Allocation between Innovation and Imitation