This introduces static methods for registering classes and namespaces, so we don't have to mess with global variables and static members fields. Bug: T240535 Change-Id: I1abb27bd70898d04c9253e0b7467447fa96d15a4