Theresa May appears to have faced down Brexiteer Cabinet ministers after securing agreement on plans which will keep the UK closely aligned to Brussels.