Added CGlobal - singleton to hold global state.

  This will hold the current mode, the currently selected folder, etc.
  Stub changes for get_mode/set_mode

  Now that we have CGlobal these can be used to store/retreive the
 current global mode.