Handle 2i `timeout` error correctly

Don't cause a 500 + mochiweb error
Fix local timeout status
Store monitor state in gen_server state

Don't call into the monitor process to get Type
Remove redundant monitor loop code
Throw a 503 not 500 on a timeout
Merge pull request #632 from basho/gh631-stat-crash

Store monitor state in gen_server state
Fix orphan stat repair process

A customer had a good number of riak_kv_stat restarts due to problems in
folsom as of yet undetermined. The number of processes was observed to
balloon in size. The stat repair process was created every time a
riak_kv_stat process was restarted. riak_kv_stat monitored this process,
but this process did not monitor riak_kv_stat, so when that went away,
this process stayed around forever blocked waiting on its msg box.
This change ensures the process monitors riak_kv_stat so it goes down
with it.
guard handoff as well
port from master to 1.4
moar logging
add guard to AAE
Merge pull request #638 from basho/pemv-drop-bad-data

Transform deserialization errors and CRC check failures into not_founds for 1.4
Merge pull request #636 from basho/eas-fix-orphan-stat-repair

Eas fix orphan stat repair
Merge pull request #635 from basho/gh625-stream-timeout

Handle 2i timeout
cherrypick and adapt 1.3 fold hardening
Merge pull request #641 from basho/pevm-leveldb-fold-hardening-1.4

leveldb fold hardening for 1.4
Roll dependencies for 1.4.2
fix HTTP MR error reporting (cherry pick PR #639)

These case clauses haven't matched since the 1.3 release, if my
testing is correct. This patch reinstates use of
riak_kv_mapred_json:jsonify_pipe_error to send useful JSON to
an HTTP client.

This is a cherry-pick of commit 41890a93439bce681e25022b43623e781196c542
from pull request #639.
Fix 2i timeout messing with next request

When the webmachine process handling the 2i request times out, it was
returning an error message, but messages from the index FSM could still
arrive at this process later in a different context (in mochiweb)
causing it to send error messages to the client, which at that point
could be sending another request down the same connection. That
unrelated request was failing with a 400 "unexpected data" message.
This fix uses a big hammer: on a timeout in the wm process, it will try
to kill the index FSM and consume any messages sent from it before
returning a timeout error message to the client.
Replace busy wait with monitor check

My dumbass coded the kill + busy wait loop for no good reason. Setting
up a monitor, killing the process and waiting for the 'DOWN' message is
the obvious elegant Erlangy way to kill and wait for a process to die.