Tens of thousands walk out over government proposals to amend contracts that doctors say will remove safeguards.