Implement style naming.

This includes the StyleManager class and style indexing.
Add some style unit tests.