Fix issue with db code trying to update index on non-deletable field.
Create schema for startup.xml file.

Adds the startup.xml schema (including a schema for configuration objects) to the db.  This is currently XML-only, but one could imagine a SQL version so that users could store their preferences on a database to make them available on multiple machines.
WIP: Rewrite the startup and configuration code.

Improves the startup and configuration code to use the db module and also streamline things so that they are much more readable.
Fix issue with defaulting the package identifier.

The registry's self._current_package can be None if no package is
being loaded.  In such cases, we need to detect this and flag the
error if the user has not specified the package identifier as an
argument to add_module.  This should normally only be an issue for
tests.

vistrails/core/modules/module_registry.py:
  - ModuleRegistry.add_module: fix issue when defaulting package
    identifier and version
Fix issue with defaulting the package identifier.

The registry's self._current_package can be None if no package is
being loaded.  In such cases, we need to detect this and flag the
error if the user has not specified the package identifier as an
argument to add_module.  This should normally only be an issue for
tests.

vistrails/core/modules/module_registry.py:
  - ModuleRegistry.add_module: fix issue when defaulting package
    identifier and version
Continue rewriting startup code.

Changes include:
 - Allows VisTrails to run without a .vistrails directory set
 - Startup manages the coordination between the different configurations (default, persistent startup.xml, options_dict, and command-line)
 - PackageManager has direct access to registry and startup
 - Package configuration is managed through startup
 - nologger default changed to False in the correct place
 - ThumbnailCache uses a temporary directory if .vistrails is unset

In general, you should make sure that options appear in the default configuration (fixedSpreadsheetCells did not).

Have to decide how strict to be about configuration.  Should we flag unknown options and disable/delete them or allow them to be added?

vistrails/core/application.py:
  - rewrite read_options to store options in a separate configuration
  - make configuration access via the startup object
  - simplify init, put major items (startup, registry, and
    package_manager) there instead of inside of startup

vistrails/core/configuration.py:
  - some minor changes to dealing with config values to allow None
  - defaults: use $DOT_VISTRAILS to make directory specification
    relative, nologger -> False, add fixedSpreadsheetCells

vistrails/core/modules/abstraction.py:
  - Fixed issue with cannot_load items, allow abstractionsDirectory to be None

vistrails/core/modules/package.py:
  - simplify storage, make persistence go through startup

vistrails/core/packagemanager.py:
  - allow userpackages to be unset
  - remove init_registry, move to core/application
  - access startup configuration/persistence directly
  - replace dom_element calls with calls to startup

vistrails/core/resources/default_vistrails_startup_xml:
  - nologger -> False

vistrails/core/startup.py:
  - make VistrailsStartup a subclass of DBStartup, add logic to load
    persistent configuration into defaults and before temporary
    options
  - use ConfigurationObject.dotVistrails and a use_dot_vistrails flag
  - add logic to support "$DOT_VISTRAILS" prefix
  - add logic to set packages to enabled/disabled and persist package
    configuration
  - change tests to use ConfigurationObjects

vistrails/core/thumbnails.py:
  - allow cache directory to be a tempdir

vistrails/gui/application.py:
  - call initialize_packages directly

vistrails/gui/preferences.py:
  - change TestPreferencesDialog to check startup instead of using old
    xml commands, also add more processEvents calls to make sure
    current package is actually set
Merge branch 'master' into rewrite-startup

Conflicts:
	vistrails/core/application.py
Continue rewriting the startup code by unifying command-line and config.

Changes here include:

- use a single base list of configuration options that is then used to
  generate both the ConfigurationObjects as well as the command-line
  options
- differentiate between roles of options (some are strictly
  command-line options (e.g. batch), some are not meant to be user
  editable (e.g. recentVistrailList)
- more readable documentation for configuration options/command-line
  flags that can be parsed and used
- switch to argparse from optparse which is deprecated in python 2.7
- start the translation from old option names to new ones
- probably breaks actual execution right now

vistrails/core/configuration.py:
  - switch config to list with many options
  - code to parse documentation from full-width string
  - generate both configuration and command-line parser from that list

vistrails/core/system.py:
  - add shell_font_face, shell_font_size methods for each system

vistrails/db/versions/v1_0_3/translate/v1_0_2.py:
  - start tracking changes in option names, removal of old options

vistrails/gui/debug.py:
  - DebugView.write: alwaysShowDebugPopup -> showDebugPopups
Change naming across application to match new configuration.

*** NOTE *** This supposes an updated ~/.vistrails/startup.xml file so I
wouldn't recommend running it with your normal startup.xml as it can
rewrite that file. Translations should fix this issue later.

This is mostly name switches, although also moves logs to a "logs"
subdirectory in ~/.vistrails since the logFile config that converted
to a directory and then named it according to version was obfuscated.
Also uses the new command-line parser in configuration.

The test suite passes modulo the TestImports test which has an issue
with the Mac binary.
Move path chooser buttons to common_widgets

The path chooser buttons that existed in
gui/modules/constant_configuration.py are more generally applicable
and should be reused throughout the code.  This commit refactors them
into gui/comomn_widgets.py and prefixes a "Q" in front of their
classnames.

vistrails/gui/common_widgets.py:
  - QPathChooserToolButton: moved, added defaultText parameter and getter
  - QFile/QDirectory/QOutputPathChooserToolButton: similar changes

vistrails/gui/modules/constant_configuration.py:
  - note that because of dependent imports, the tool button imports
    are in the create_browse_button methods
  - PathChooserWidget.create_browse_button: allow cls argument
  - File/Directory/OutputPathChooserWidget.create_browse_button: pass
    corresponding button

vistrails/gui/variable_dropbox.py:
  - remove unused import
Make preferences more automated, customizable, and user-friendly

The major change is to remove a ton of hard-coded widgets for each
setting and to eliminate the "Only for this session" choices,
replacing that with warning signs and a message box if a user changes
those settings.  This should save on maintenance and eliminate a
decent chunck of code which making preferences more user-friendly.

dist/windows/input/startup.py:
  - don't set the nologger setting

vistrails/core/application.py:
  - VistrailsApplicationInterface.read_options: use a blank config obj

vistrails/core/configuration.py:
  - _simple_documentation: docs for preferences
  - ConfigField: new class to organize configuration field options
  - ConfigFieldParent: new class to organize hierarchical settings
  - base_config: now a dictionary, organized by category
  - build_config_obj: tweak to support fields
  - parse_simple_docs: new method
  - find_simpledoc: new method
  - build_command_line_parser: changes to support fields

vistrails/gui/configuration.py:
  - remove all status_bar references/constructions
  - QConfigurationPane: new class to support generic configuration
    panes, main idea is to have this be data-driven so the interface
    is auto-generated from the fields (with optional customizations)
  - QGeneralConfiguration: **removed**
  - QThumbnailConfiguration: **removed**

vistrails/gui/preferences.py:
  - remove all status_bar references/constructions
  - QPreferencesDialog: use simple tab layout based on config
    categories and generate the tabs from the fields
Remove config changes made for testing purposes

vistrails/gui/configuration.py:
  - QConfigurationPane.__init__: remove config inverts
Merge branch 'master' into rewrite-startup

Conflicts:
	vistrails/core/application.py
	vistrails/core/configuration.py
	vistrails/core/startup.py
	vistrails/gui/application.py
	vistrails/gui/configuration.py
Moved spawned logic to startup, edited spawned xml startup.
Merge branch 'master' into rewrite-startup

Conflicts:
	vistrails/gui/application.py
Improve logic and configuration for default view on load.

Use a string to store which logic we use to determine whether the
history or pipeline view is shown.
Fix translation from nologfile to errorLog.
Merge branch 'master' into rewrite-startup

Conflicts:
	vistrails/core/application.py
	vistrails/core/configuration.py
	vistrails/core/modules/package.py
	vistrails/core/packagemanager.py
	vistrails/db/versions/v1_0_3/domain/auto_gen.py
	vistrails/db/versions/v1_0_3/persistence/xml/auto_gen.py
	vistrails/gui/debug.py
	vistrails/gui/modules/constant_configuration.py
	vistrails/gui/preferences.py
	vistrails/gui/variable_dropbox.py
Fix issues with merge
Only destroy ThumbnailCache if it exists