Nurses across the UK have voted to strike in a dispute against pay.