Improved ContextMap storage format.
Moved ContextMapComponent from inner class to private outer class.

EXPLANATION: Python's pickle machinery is unable to locate inner classes. This
can be remedied by changing inner classes into private outer classes. Our
documentation and import system sees no difference, although the structure of
the code is less elegant.