NUL-terminate config cache buffer after reading

Change-Id: I61f47e05af500d6216f45d1e0c6e8f5f2f0d8105
Reviewed-on: http://review.couchbase.org/25372
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>