get/set the current (global) mode.

  Our mail client will be modal, so we're always in one of three
 modes.  We can now set/get this mode from either C++ or lua.