cherry pick 5de7972 into 1.3 branch (backporting)

It was desired to have the riak_core_vnode_worker_pool race from
basho/riak_core#300 backported to the 1.3 branch. The parent commit
containing the regression tests for this race has been elided, since
it requires changes to poolboy that are not otherwise required to
fix the issue (so there is no need to roll a new poolboy version).

Original commit message:

fix races between riak_core_vnode_worker_pool and poolboy

This patch fixes both races demonstrated by the test in the previous
commit, and described in #298.

The fix for the checkin race is for the worker to only checkin to
riak_core_vnode_worker_pool, and allow riak_core_vnode_worker_pool to
decide when to checkin to poolboy. If there is outstanding work in the
queue, the worker will just be reused immediately instead of being
checked in.

The fix for the DOWN race is for the worker to send a 'worker_started'
message to riak_core_vnode_worker_pool, when the worker starts. While
the worker is sending this message, poolboy is blocking, so
riak_core_vnode_worker_pool can send poolboy a checkout message
immediately, and still be guaranteed that it will be received after
poolboy has put the worker in its pool.

Documentation about how this works, and about how
riak_core_vnode_worker_pool is acting as a queue wrapper around the
pool, is also included.
Implement vnode overload protection
Rewrite and extend the vnode overload protection logic

The primary change is the addition of a fast path method for adjusting
the estimated mailbox size of a vnode. The vnode proxy now sends a ping
to the vnode after a configurable number of messages.  If the vnode
replies, the vnode proxy knows that all messages sent before the ping
have been handled and therefore it can adjust the mailbox estimate
accordingly. In the common case, this ping/pong approach keeps the
mailbox estimate up-to-date without ever falling back to the more
expensive process_info call.

Minor changes:
-- When a message is dropped, the `dropped_vnode_requests_total` counter
   is incremented.
-- When a vnode exits, the proxy resets its overload state.
-- Overload parameters are now configurable via application variables.

The `vnode_overload_threshold` setting determines the overload threshold.
If a vnode mailbox ever reaches this number, the corresponding vnode proxy
starts dropping messages. When set to `undefined`, overload protection is
disabled and the vnode proxy uses the older/more efficient code path.

The `vnode_check_request_interval` setting sets the frequency of mailbox
pings. After this number of messages have been forwarded by the proxy,
the proxy will send a ping message.

The `vnode_check_interval` setting sets the maximum number of messages
that can be sent before the proxy will directly query the vnode mailbox
size using process_info.
Merge branch 'jdb-vnode-proxy-overload-1.2' into jdb-vnode-proxy-overload-1.3
First draft (3rd edition), ready for some review

Vnode replies always go via reply(), and reply() always uses unreliable
messaging.  (As opposed to the usual (and more reliable) send-and-pray
messaging.)

During handoff, all forwarding requests use unreliable vnode master
commands to avoid net_kernel blocking interference.
Review: fix return value of bang_unreliable/2
Add PULSE instrumentation to riak_core_send_msg.erl
Merge pull request #307 from basho/bwf-pool-race-1.3

Backport issue 300 to 1.3 branch
Merge pull request #314 from basho/jdb-vnode-proxy-overload-1.3
Merge pull request #317 from basho/jrw-gh274-13backport

Backport of #299 to 1.3
Roll riak_core version 1.3.2
Merge branch '1.3' into eas-1.3.2-to-master

Conflicts:
	src/riak_core_vnode_worker.erl
Merge pull request #326 from basho/eas-1.3.2-to-master

Staged merge from 1.3 branch pre 1.4 release