Improve thread safety of Composable

This commit ensures that error and value are always read and written
while locked on monitor. It also ensures that where error and value
need to be considered together the monitor is locked for the duration.
This means that neither field needs to be declared volatile.
Similarly, hasBlockers, which was already only read or written while
locked on monitor does not need to be declared volatile.

delayedAccept has also been updated. Previously, two threads working
through the method in parallel may have resulted in the single value
or all of the iterable's values being accepted twice. This is now
avoiding by tracking the state of the accept: delayed, accepting, or
accepted using a separate monitor that can be waited upon when in
accepting state. The value(s) or error that need to be accepted are
accessed while holding the monitor lock, but the actual calls to
accept are done without holding any locks to avoid making an alien
call while locked. This avoids the possiblity of deadlock and of the
locks being dropped due to some downstream code calling Object.wait.

Thankfully, these changes appear to have maintained or improved
throughput, most likely due to the more coarsely-grained locking
which has reduced the number of flushes that need to be performed.

Before:

worker pool throughput (79801ms): 375935/sec
worker throughput (8168ms): 3672870/sec
root throughput (6142ms): 4884402/sec
single-producer ring buffer throughput (3923ms): 7647209/sec

After:

worker pool throughput (81134ms): 369759/sec
worker throughput (7522ms): 3988301/sec
root throughput (5595ms): 5361930/sec
single-producer ring buffer throughput (3584ms): 8370536/sec
Merge branch 'thread-safety'