Print good error messages when open/close of sqlite fails
Print good error messages when open/close of sqlite fails

Many things can go wrong when we cann sqlite3_open_v2 so
when something does print out exactly what it is.

We should similarly be checking error codes when we close
sqlite.

Change-Id: I1ee8b0bcd151147f94269bdd25285edeef3e8dd6
Reviewed-on: http://review.couchbase.org/11531
Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Tested-by: Michael Wiederhold <a17fed27eaa842282862ff7c1b9c8395a26ac320@couchbase.com>

daverigby/ep-engine,hisundar/ep-engine,teligent-ru/ep-engine,couchbaselabs/ep-engine,couchbaselabs/ep-engine,daverigby/ep-engine,owendCB/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,daverigby/kv_engine,daverigby/ep-engine,couchbase/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,abhinavdangeti/ep-engine,couchbaselabs/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,daverigby/ep-engine,couchbase/ep-engine,couchbaselabs/ep-engine,sriganes/ep-engine,couchbaselabs/ep-engine,membase/ep-engine,daverigby/kv_engine,membase/ep-engine,daverigby/kv_engine,hisundar/ep-engine,hisundar/ep-engine,jimwwalker/ep-engine,abhinavdangeti/ep-engine,membase/ep-engine,sriganes/ep-engine,sriganes/ep-engine,owendCB/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,sriganes/ep-engine,daverigby/kv_engine,membase/ep-engine,abhinavdangeti/ep-engine,abhinavdangeti/ep-engine,owendCB/ep-engine,jimwwalker/ep-engine,jimwwalker/ep-engine,abhinavdangeti/ep-engine