Add 2i term regex filter

Adds a regular expression filter for secondary index terms. With this
you can scan a range for a binary index from, say A through Z, but only
use items that match terms containing "AA".
This filter does not work with integer queries, but it does work with
$key queries.

Regex compilation: currently it's done in the vnode, as different nodes
might have different versions of the regular expression library.
The PB and HTTP will compile the regular expression to validate it and
will return an error if it is invalid.
Bump riak-core dep to 1.4.3
Merge pull request #715 from basho/feature/2i-regex-filter-1.4

2i term regex filter 1.4
Make 2i pagination sort optional

This addresses the performance penalty from the new default of sorting
2i results since pagination was added. When paginating, (max_results
set) sorting is always enabled. But when not, it will only be used if
configured in app.config or specified in the client request.
Continuation implies pagination sort

Even if max results is not passed, using a continuation implies an
expectation of results ordered in the standard paginating way.
Fix vnode sending > max_results items for 2i query

This change sends the max_results value in the 2i query to the vnode,
which then may be used as the batch size if < than the default batch
size.  Before, a batch would be sent with possibly more items than the
index FSM would ever send back to the client.
Update sext dep to point to basho/sext
Merge pull request #743 from basho/feature/2i-vnode-obey-max-results

Fix vnode sending > max_results items for 2i query
Add timer:sleep()-based throttle to riak_kv_exchange_fsm:read_repair_keydiff()

The throttle part is easy: a 1-liner.  The rest is the infrastructure
to poll each node for its maximum vnode mailbox queue length, pick the
worst one, calculate a sleep time based on a list of {Q_length, SleepMSec},
and communicate via time-honored application env vars.

The only hot code path that reads the ETS table for app env vars is
riak_kv_exchange_fsm:read_repair_keydiff() itself, and since it is
doing a full KV get FSM plus other stuff, the extra heat on the hot
path is insignificant.
Update deps for pre 1.4.4 build
Fix eleveldb to 1.4.4 tag
Add 2i AAE command

This change adds support for a manual command to repair secondary index
data that is out of sync with the KV objects. The command will
repair a given partition or all partitions in a given node, with an
optional speed throttle parameter. The speed throttle is a duty cycle
number such that if 50 is given, it will try to do some work, then wait
for the time that work took before the next unit of work and so on.

Each vnode will now have a special AAE tree where it will store hashes
for the 2i data of each object in the backend.
When the command runs, for each partition to be repaired it fetches all
secondary index data from the backend and builds a temporary hashtree.
It then runs an exchange between this temporary hashtree and the vnode's
2i AAE tree. Differences found will trigger an index refresh command
that will rewrite 2i data based on an object's current index terms.

A fold_indexes command has been added to index supporting backends to
fold only over 2i data, as well as a refresh index put that will only
rewrite index data that is inconsistent. This was all added to the
memory backend too, which is kind of overkill as it should never have
any 2i inconsistencies, but it makes other layers agnostic, so...
The multi backend was also updated.

Data for this operation will be stored in the anti_entropy directory in
a new '2i' folder. It should be cleaned up after each operation under
normal conditions. LevelDB is used to create the temporary 2i database.
Some tuning might be needed in the future. It would be nice to have a
mostly in-memory database that only used disk if the 2i data was too big
to fit into some amount of data specified by the operator.

This includes a new stat for index refresh puts
Merge pull request #736 from basho/feature/2i-aae-1.4

Add 2i AAE command
Fix non-eunit compilation error
Fix CS buckets 2i query

This change makes sure that those always use pagination sort and fixes a
problem with start/end parameters after the refactor for the 1.4.4 2i
changes.  This uncovered some inconsistencies with the internal 2i query
parameters. This makes sure that bucket queries don't set start/end terms
and quality always have start=end and return_terms=false, among other
things. All 2i riak tests pass with this.
Merge pull request #759 from basho/bugfix/cs-buckets-2i-cleanup

Fix CS buckets 2i query
Disconnect external/internal return terms 2i param

Unfortunately I got confused yesterday when refactoring the 2i
parameters. There is an external return terms param that controls
whether the user will receive (term, key) pairs or just key values.
There is also an internal return terms parameter that controls whether
(term, key) values will be passed from the vnode to the FSM. That
internal one is only off for equality queries or when using the fake 2i
keys that simply fold over regular keys ($bucket, $key). This change
decouples them in the http interface.
Merge pull request #762 from basho/bugfix/2i-internal-return-terms-fix

Disconnect external/internal return terms 2i param
Fix error when hashing index data in tree builds
Fixed crashing 2i queries in mixed clusters

* In a mixed 1.4.2 - 1.4.4+ cluster, terms are not passed back to a
  query originating in a 1.4.2 node.
* In a mixed 1.3.2 - 1.4.X cluster, terms are passed back to the 1.3.2
 if the query originated there.