Refactor session, move config and session initialization into core

The session refactor removes redundant code and lays the foundation for
switching between sessions.

The config and session components are now initialized in cilantro/core
rather than their own modules.