A proposed law requiring the UK to recognise a Palestinian state has been rejected by the Government.