Fix deadlock between SocketManager::send() and internal::send().

This was a deadlock between the 'this' and 'processes' synchronized
blocks that occured because the .then() on socket futures can be
invoked immediately with the new implementation of io::poll().

Review: https://reviews.apache.org/r/28367
Add thread local to short-circuit run_in_event_loop().

This improves performance by short-circuiting run_in_event_loop() to
just call the lambda if it is already in the event loop.

Review: https://reviews.apache.org/r/28184