Save user interface meta information.

 * Currently only locked state. Perhaps this should better go directly to
   layout.xml.
Save and load project meta information.

 * Save IdeModes state. Not fully working (hidden dock items due to state
   aren't restored after loading). Perhaps this should really go to the ui
   stuff.

   The xml loading (and saving) procedure is always the same so it would make
   sense to have an abstraction of it (entry point, etc.) or some helper
   methods.