Split SbtClient into a raw SbtChannel and the current SbtClient

SbtChannel is just the basic connection; it doesn't cache stuff
or track state. Just one level above ipc.Client, it does
the initial registration and lets you use callbacks instead of
threads if you want.

Not in this commit, but implied by it, is an API break where
SbtConnector will give you the channel only, and then you
do SbtClient(channel) if you want the client.

Also implied by this is a future path where we make SbtClient
track even more state.

The general idea is that we can make SbtClient its true self
(very convenient, but perhaps a little bit heavy), while
also making SbtChannel its true self (just the raw protocol).
Keeps the code a little tidier too since there are now fewer
low-level socket concerns in SbtClient.
Fix a deprecation warning in RequestLifeCycle.scala
Remove dedicated thread from SimpleClient

The thread in SimpleChannel is good enough, nothing is gained
by adding another one in between.
Implement SbtConnector in terms of channel not client

Now open(SbtClient => Unit) is a trivial convenience wrapper for
openChannel(SbtChannel => Unit), and subtypes of SbtConnector
just implement openChannel and don't need to mess with client.
Remove all implementation from SbtClient, SbtChannel, SbtConnector

Keep these as pure interfaces only to simplify future ABI
maintenance.

This commit is intended to have no semantic changes just move the
implementation around.
Replace SbtChannel.claim() with claimMessages()

This atomically adds a listener and starts the event thread,
which ensures the listener will not miss any events.
Ensure that when adding message handlers, they ALWAYS get a ClosedEvent
Make LogEvent a trait with TaskLogEvent/CoreLogEvent subtypes

This means the taskId is never 0 - with no task we have to
use CoreLogEvent.

This paves the way for log events tagged with something other
than a task ID, such as a background job ID or whatever.
Merge pull request #182 from sbt/wip/havocp-sbt-client-split

Split SbtChannel out of SbtClient
Merge pull request #184 from sbt/wip/havocp-log-event-trait

Make LogEvent a trait with TaskLogEvent/CoreLogEvent subtypes
Merge remote-tracking branch 'origin/master' into wip/havocp-remove-serialization-registry

Conflicts:
	client/src/main/scala/com/typesafe/sbtrc/client/SimpleClient.scala
	commons/protocol/src/main/scala/sbt/protocol/WireProtocol.scala
	commons/protocol/src/test/scala/ProtocolTest.scala

This merge includes the SbtClient/SbtChannel split, and is broken because
we don't yet pass the serializations from SbtClient to SbtChannel.
However in this merge it compiles though doesn't work correctly.
Make SbtClient require serializations in the constructor

Otherwise there is a race where the serializations might not
be added before the event we need to deserialize.

If we need more serializations on the fly, a possible API
would be to allow providing a deserializer to watch().
We could use that deserializer to rewrite events from
ValueChanged[JsValue] to ValueChanged[T] when invoking the
watch() handler. But not in this commit for now.
Simplify the DynamicSerialization types

Since SbtClient no longer needs a mutable one, just use
DynamicSerialization as the only public type, and implement
the trait with a private final case class.