The ref needs to be in-scope of the recieve for it to be optimized.
Revert to a macro-only, non-recursive on eagain method for managing requests.
Increase the max queue size.
Increase the number of queues for work to reside.  Worker threads, once started, don't exit until shutdown.
Ignore requests for stats for right now.
Really disable stats.
Revert changes to async_nif and re-enable stats.  Fixed selective recv.
Lower the queue size to shrink potential for latency in queue. Remove earlier idea that more queues would lead to more even worker progress, just have 1 queue per Erlang-scheduler thread (generally, 1 per CPU core available).  Also change the way worker threads decide when to cond_wait or migrate to other queues looking for work.
With some input from Jon I've managed to reduce this back into a macro rather than a fun and a macro calling a fun.  He also suggested that on eagain I sleep a small amount of time so as to allow other work to catch up a bit.
I think the make_ref() needs to be within the fun()'s context to trigger selective receive optimization in the beam's runtime.
Re-use the unchanging value of 'Args' rather than including it in every recursive call.
Remove the sleep from async_nif's EAGAIN path because it doesn't seem to have a positive effect.
Change backpressure method from EAGAIN to bump_reductions so as not to block Riak/KV vnode processes when queues backup.
Every enqueued request now includes a hint as to how much work is pending in
the lower C-code.  We use that to scale the reduction count penalty so that we
can (hopefully) signal to the Erlang scheduler enough information for it to
properly throttle work.  'eagain' should only happen when queues are full, we
have no choice but to keep this calling proc busy in a recursive loop trying
the request over and over if we're going to preserve request ordering.
Update to latest release of WiredTiger.  Also, make sure Snappy builds before WiredTiger.
Because the build decends into the ext/compressors/snappy directory the
relative paths won't find system/include, so use the absolute paths instead.
Use malloc/free rather than enif_alloc/enif_free so as to avoid BEAM allocator
overhead (bytes and time).
Use malloc/free rather than enif_alloc/enif_free so as to avoid BEAM allocator
overhead (bytes and time).  Create static references to commonly used Erlang
atoms to avoid overhead re-creating them on each request cycle.
Start the penalty after queues are 25% full because a) that makes sense, and b)
that avoids some odd badarith errors when PctBusy is very small.
Merge remote-tracking branch 'origin/master' into gsb-rcu

Conflicts:
	c_src/async_nif.h
	c_src/build_deps.sh
	src/async_nif.hrl