more work towards https://github.com/facebook/libphenom/issues/6

I could only get this to repro with clang built using homebrew,
and it triggered rarely.

This is a continuation of the prior fix attempt, which "fixes"
things by not triggering the barrier call from inside the TLS
dtor.

This introduces the possibility of a resource leak on thread shutdown
if the thread is not one spawned by the phenom thread functions
directly, so we'll need to do some follow-up work on this.
Fix bug: close socket when connect failed
update ignores for newer automake test suite artifacts

I updated my autotools and have a bunch of new generated bits to ignore
Make it easier to bench and chart iopipes.t

Relatively quick and dirty PHP script to drive iopipes.t with varying
parameters and collect it into a csv.

Thanks to Samy Al Bahra for the `R' script
tidy up gimli heartbeat

Just use a simpler approach of triggering a barrier on a set interval,
then pinging the heartbeat afterwards.
use a smaller font for scale.png

Makes it easier to read off the numbers when we go as high as 100k
add note about autoconf and automake

See https://github.com/facebook/libphenom/issues/14
Allow json parser to indicate whether a failure is transient
fix runtime assert to assert if !expr...

welp, that's a bit embarrasing.  Also print out a more meaningful
message.
nbio scheduler adjustments for OSX

- Don't treat EV_EOF as an error condition.  It can be asserted even
  when there is data pending read in the kernel buffer; if the remote
  does SHUT_RD but is still connected we'll get EV_EOF.
  Instead, we detect EOF by attempting to read.  Adjust debug_console
  accordingly.

- Because of this difference, the socket dispatcher will attempt queue
  up an nbio mask manipulation for read, then queue up a subsequent
  clearing of the mask during free.  Our STAILQ stuff will corrupt
  the list if you attempt a double insert and this leads to badness.
  So we need to use a flag to determine if we have a pending item.
Don't leak bufs and streams in the debug console

There's some slight irony in that checking the memory usage could leak
memory.
fixup quickstart example

Also advertise the cares dependency in the pkg-config file so that
we can use the simple compiler invocation I've just added to the docs.
fix build on 32-bit systems

Addresses https://github.com/facebook/libphenom/issues/13
The underlying issue is that 32-bit systems don't have 64-bit CAS
primitives so we need to size our ring bits to the system pointer
size instead.

I did some light testing of this by amending tpool.t to use 64 threads
and it seemed to work (the concern would be whether we overflow
MAX_RINGS)
Add an echo server example

Addresses (at least in part!)
https://github.com/facebook/libphenom/issues/10
update quick start

* make sure they `make install`
* make sure they're using optimization

also: advertise the IRC channel
add header file: unistd.h
add header file: stdlib.h
Fixed bug when reading data from buffer queue with more than one buffers
add emitter affinity

Addresses the bulk of https://github.com/facebook/libphenom/issues/21
I'm punting on mutiplexing scheduler threads on emitters for now,
simply because the current epoll() syscall implementation is a
limiting factor.

This commit does a couple of things:

* Factors the various system dependent emitter code out into files
  of their own
* Factors the emitters so that we can set up multiple emitters
* Create one emitter per scheduler thread
* Increases the size of the emitter event buffer; previously, we
  would collect only a single event at a time in order to be fairer
  to the rest of the scheduler threads.  Since jobs are now affine,
  we no longer have this concern.  (This comes at the cost of a slow
  job delaying all the other jobs with the same affinity)
* Adds `emitter_affinity` to the job struct; this can be used to
  set the affinity of the job (surprise!)
* Set emitter_affinity in iopipes.c
* Fixup the Illumos build

The affinity change gives us almost linear scaling of the dispatch
rate in iopipes.t as we raise the number of scheduler threads;
previously, we'd see a drop-off as we passed HT and socket boundaries
due to cache coherency traffic overheads.
Merge remote branch 'upstream/master'