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