The German government has approved a law of self-determination allowing people to change their gender and name more easily.