MB-12179: Remove EPStats from CouchKVStore

We no longer need this dependency in the KVStore and I moved the
only stat that we updated into the KVStore since I think it makes
more sense to have it there anyways. I'm planning on modularizing
the KVStore soon so that we can write unit tests, but am adding
this change now since it simplifies some of the refactoring I did
in following changes.

Change-Id: Ifdd48857e076b57606a65a49521d9021556dd8ac
Reviewed-on: http://review.couchbase.org/41781
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12179: Refactor database scan code

This change splits the database scan (called dump in our API's) into
three separate phases. The first is initializing the scan, the second
is actually doing the scan, and the last is closing the database. One
fundamental change is the fact that we now keep a handle to the
database file in the KVStore until the handle is closed. This change
paves the way for allowing us to have pausable backfills.

Change-Id: Ifa1b6f9524fe5b20d6d522fcbabb822e36e66957
Reviewed-on: http://review.couchbase.org/41826
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12179: Make the scan API's accessable through the KVStore

Change-Id: Iec845dd48b5f753ddee13793c8c2973196a1eb0a
Reviewed-on: http://review.couchbase.org/41827
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12179: Remove the old dump API's from the KVStore

We should now use the scan API's that were added in the previous
patch-sets.

Change-Id: I788aee255a3d8e87e8f6dff938a15bbe054038a6
Reviewed-on: http://review.couchbase.org/41833
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12179: Move dcp backfill into its own file

We are going to be making a fair amount of changes to this class
and it constitutes having its own file.

Change-Id: I4139ef360fdb823b16348c2c1bc010868f47c5d8
Reviewed-on: http://review.couchbase.org/41834
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-12179: Make DcpBackfill class a state machine

Change-Id: I7e14fba6dcd91810ea83f8c5836ce4e0507a926f
Reviewed-on: http://review.couchbase.org/41835
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
WIP MB-12179: Pausable backfills

Change-Id: Ibf73445e480d9d227b719148df36ec121662a1b8