[MOD] Options, CSV, JSON: refactorings
[MOD] Options: improved typing of enums and nested options
[MOD] Options: hard-coded option strings replaced with Option instances
[MIN] Options: comments
[MIN] Options: cleanup
[FIX] Core, Locking: Downgrades to no Write locks

When downgrading from a local write lock to no write locks, the
local write lock counter was not decremented, thus global read lock
transactions would fail.

Additionally contained:

- Added locking unit test
- Moved XQuery locking test to appropriate package
- Reenabled downgrades
[ADD] Serialization of XQuery maps to JSON.
      Example. serialize({ "A":"B" }, { 'format' : 'map' })
[ADD] JSON: Serialization of XQuery maps to JSON
[MOD] GUI: export dialog revised
Merge pull request #768 from JensErat/downgrades-fix

[FIX] Core, Locking: Downgrades to no Write locks
[MOD] DBLocking fix merged
[MOD] JSON: 'merge' and 'strings' options moved to general JSON options
[FIX] CLI: check HOME variable. Fixes #773
[MOD] JSON default changed from "RFC4627" to "liberal".
[ADD] CSV parsing to maps and vice versa
[ADD] XQuery: convenience function map:serialize() added
[MOD] JSON Parser: default parsing reverted to RFC4627
[FIX] XQuery, JSON Serialization, liberal spec: unnested <json/> nodes
[FIX] XQuery, Java Mapping: convert class paths to CamelCase
[MOD] Move `StaticContext` out of the `QueryContext`.