Resident doctors in England have voted to go into dispute in a row over working conditions.