utils: Implement new API for better configuration storage

QSettings has been used to store configuration, including critical data
like the contacts list. But it is flawed: lack of atomic writes can result
in data loss, the ini format is limited and crappy, the API is awful,
and there is no easy way to support QML or bindings.

This system addresses these concerns with a new JSON-based settings API.
It can be exposed to QML, supports change notification, always uses
atomic writes, and improves the read/write APIs.

Fixes #21
Port code to new settings API and add auto-import

Port everything to the new settings API, and remove the old code.

On first use, existing configurations will be imported. All known
settings are preserved. The old configuration will not be removed after
import to prevent data loss; they may be cleaned up in some future
update.
utils: Move config locking out of Settings