Returns a setting from its key.
A default value can be specified when no setting is associated with the key.