Remove compiler warnings

Change-Id: I48743038fba8bb9df4a8d392b48bd79d8029a16d
Reviewed-on: http://review.couchbase.org/30703
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Refactor table scan in couchkvstore

We no longer use the code that allows us to schedule a table scan
for all vbuckets. This code should be especially removed since we
have multiple couchkvstore instances per bucket and doing a table
scan for all vbucket means all 1024 vbucket.

Change-Id: Ib0aee0ca9621a123ee0d46906448c9a08bd72dc0
Get num backfill items from the kvstore

This should be much more accurate and I also found some
underflow issues with the old implementation.

Change-Id: I3f90c04dac0fbe103d4016e666a03edb31061eff
Use ConnMap in backfill task

This will allow us to specify different behavior based on whether
or not the connection is for tap or upr.

Change-Id: I6f799e68e3d62902e913919126707cb482bc454b
Allow specification of start/end seqno ids when doing backfills

This will allow upr clients to specify a range of data they they
want to receive when doing a backfill. Note that we can likely
refactor the backfill logic in the future to make it simpler.

Change-Id: Ib95d0693838cd405bbc532f50cf7386cc94ffaac
Refactor the way messages are retrieved from an upr producer

This cahnge adds in a ready queue that contains message waiting
to be sent over the wire for a given connection.

Change-Id: I1f60c2c37a98b6f9df9965e6803836ac4c0c7862
Move all functions out of TapProducer class

Change-Id: I1332619f132b2980962e21d6eb43984f7a4bbb51
Move most of Producer logic into TapProducer

A lot of the logic in the Producer class will not be used
by the UprProducer. This change moves that logic back into
the TapProducer class.

Change-Id: If04715468340e848d857e8641407eaa75e6035aa
Add upr backfilling

Change-Id: Ie5051ea17fddda1ba103ac9b062ff02cd2e99d76