Use sqlite3_complete to detect SQL queries instead of hackery.
Use sqlite3_complete to detect SQL queries instead of hackery.

Change-Id: Idbc14ed78410eec7e71a14d6fa75a15bcf8724e2
Reviewed-on: http://review.northscale.com/2801
Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>

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