Apple rally fuels tech share turnaround, lifting US stocks