MB-27459: Track the sqlite version during restore
MB-27459: Track the sqlite version during restore

We have different versions of the way we store data in sqlite and
we need to make sure we properly track the version number thoughout
the restore in order to make sure we query the database with the
right query.

Without tracking the version we will default to the most basic query
which defaults certain fields like the datatype to 0. Doing this
will cause issues for xattr documents.

Change-Id: I6af4eb79e5e3697646695c5f0642d4e01ee8235a
Reviewed-on: http://review.couchbase.org/87583
Well-Formed: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Eben Haber <d1abc94d70526bfcf3e4b0ce727cb9a6fbb52a3a@couchbase.com>
Tested-by: Mike Wiederhold <a17fed27eaa842282862ff7c1b9c8395a26ac320@couchbase.com>

couchbase/couchbase-cli,couchbase/couchbase-cli