DgSettings: Implement writing settings

Implements writing to settings, including writing to disk. For the moment
only boolean values are supported.