Resident doctors have voted to end strikes after accepting a pay deal that will see the most experienced earn more than £100,000.