Include info about requesting client in ExecutionWaiting

factor out a ClientInfo blob used here and also in
RegisterClientRequest
Merge pull request #149 from sbt/wip/havocp-send-execution-client

Include info about requesting client in ExecutionWaiting
Make RequestException do something with its message

It was just ignoring the constructor parameter, instead
of putting it in Exception.getMessage
Merge pull request #150 from sbt/wip/havocp-fix-request-exception

Make RequestException do something with its message
Register reply handlers before sending message we expect reply to

We sent a message, got serial, then registered reply handler;
we need to generate serial, register reply handler, send message.

Also mixed in are a couple of s/concurrent.promise/concurrent.Promise/
to address deprecation messages.

Also print a complaint on unexpected replies, since that probably
indicates some kind of bug.
Merge pull request #151 from sbt/wip/havocp-registration-race

Register reply handlers before sending message we expect reply to
Send debug log events with the log file locations

This is handy for people to know how to debug sbt server
issues.
Merge pull request #152 from sbt/wip/havocp-log-the-logs

Send debug log events with the log file locations
Remove deprecated use of concurrent.promise

Now only concurrent.Promise is supposed to be used.

We aren't doing imports consistently but tried to match
each individual file. Some future commit can sync
the style across files.
Merge pull request #153 from sbt/wip/havocp-promise-deprecations

Remove deprecated use of concurrent.promise
Be sure withSbt throws if it never connects

If we failed to connect, we were just never running
the tests and then "succeeding."

Also lengthen the timeout a little and print the
not-really-an-error error on the close event to
stdout instead of stderr.
Print more diagnostics if we never connect to server

Always print the connection error (but to stdout not err
since it isn't always a problem).

Try to dump the log file, and print its location.
This doesn't really work because most failures lead to
server restart which nukes the log files, but maybe we
can fix that separately.
add toString to Runnable for use in our integration test output
Synchronize the file logger

All other loggers are threadsafe so we're going to
confuse people touching this code if we aren't.
Don't feel like auditing the code we already have...
When sending JSON messages, use provided serial

This was completely breaking sbt server, but the
integration tests didn't fail because they
do not fail if we never connect to the server
at all. Fix for that in a separate commit.
Fix CanKillServer integration test for withSbt changes

Because the connect count thing was changed to be number
of connects instead of number of connects OR errors,
the CanKillServer test was broken; reworked to test
in a different way.

Also, print expected stuff to stdout not stderr and
fix to have a start-small-and-increase timeout
instead of a start-large-and-decrease timeout.
Fix obsolete doc comment for withSbt test routine
Fix insertWork on execution queue

This would stack overflow if the queue had stuff
in it because it put head of the list back on
the entire list rather than back on the tail.
Fix some broken task IDs on stdout/err log events

 - flush system buffers whenever we may have changed
   the best guess task ID so we don't have output
   with wrong ID
 - unregister IDs when done, so we don't end up
   falling back to an ID that's no longer alive
Merge pull request #154 from sbt/wip/havocp-fix-json-messages

Fix sending JSON messages