MB3360 - support restoring from WAL'ed db files
MB3360 - support restoring from WAL'ed db files

If SQLite version is older than 3.7, it won't be able to recover a
WAL-mode database files and report an error of "file is encrypted
or is not a database".

Any datbase file can be deliberately changed out of WAL mode so that
any older version of SLQite can once again access the db file.
    PRAGRAM journal_mode=DELETE;

Change-Id: I3fd040e651b1965008a9e5231509ebbc92eb544b
Reviewed-on: http://review.membase.org/5574
Tested-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>
Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>

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