The UK has been humiliated by a judgement that offers hope to other nations looking to unburden themselves from the legacy of imperialism.