Replace ann_format with ann_class.

The naming has been changed to "annotation class" a while ago.
Use a generic approach when adding the "close on enter" hook for popups

Implement a generic approach to the "close on enter" feature
in popups by installing the key event handler on the first editable
widget it finds in the popup.
Generic auto-focusing for first line edit of popup

As there is a generic approach to hooking into the line edits
in popups, use that to also do auto-focus/auto-select-all.
Automatically save/restore main window state

Fix bug #326 by saving the main window state when closing and
restoring it on startup. The default window size is 1000x720 so
that the window can still be seen entirely when on a 1024x768 screen.
This wouldn't be the case with a default size of 1024x768.
Fix objectName warnings.

Fix the following warnings:

  QMainWindow::saveState(): 'objectName' not set for QToolBar 'Main Toolbar'
  QMainWindow::saveState(): 'objectName' not set for QToolBar 'Sampling Bar'
Adapt to config key capabilities.
Use QApplication settings for persistent storage

Since the application metadata is set in application.c,
we should use it instead of providing it manually every
time we create a QSettings object.

As I understand it, subclassing QApplication in application.c
is only a workaround for bad Qt behavior. In the event
that it is removed, the application metadata should be moved
so that persistent storage still works.