The UK has become the first country in the world to announce a legally-binding target for greenhouse gas emissions beyond 2020.