improve settings API

Change-Id: I75552734bb105d9d7a7b518c13bab7642b9a9244
Reviewed-on: http://review.couchbase.org/24376
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>