Initial commit of a functional test client.
Refactor the `Request` interface.

* Remove `replies()` and `errors()` from the interface definition.
* Define `Reply(Reply)`, `Error(error)`, `Close()`, and `Do()` for
  writing and reading replies.
* Merge `Conn.trySend()` and `Conn.WriteRequest()`.
`Conn.Send`: Unblock pending `Helo` requests.

Add a `Ping` packet type.
`Update.Version` should be an `int64`.
Add a `TestClient` implementation for smoke tests.
Client: Add `DialOrigin`.
Add `Conn.Subscribe()` and `ClientPing`.
Refactor `Conn.Send()`.

* Define `Request.{CanReply, Sync}()`. `CanReply()` specifies whether
  request replies should be tracked; `Sync()` ensures that only one
  request of a given type is outstanding.
* Define `Reply.{HasRequest, Sync, CanSpool}()`. `HasRequest()` and
  `Sync()` complement `Request.{CanReply, Sync}()`; `CanSpool()`
  specifies whether replies should be spooled until the consumer is
  ready.
* Implement `PacketType.MarshalText()`. `json.Marshal()` will call this
  method when serializing structures.
Refactor `Conn.Receive()` and decoders.

* Define a `Decoder` interface for custom and default decoders, and a
  `Decoders` type.
* Expose the default decoder map as `DefaultDecoders`.
* Add `Conn.{Register, Unregister}Decoder()` for registering and
  removing custom decoders. `Conn.Decoder()` returns a registered
  custom decoder, or the default decoder if the `Conn.DecodeDefault`
  option is set.
* `Close()` now removes all pending updates and channel subscriptions.
* `Add `Conn.Registered()` for indicating whether a client is subscribed
  to a specific channel.
* Remove `Reply.CanSpool()`.
Add `Conn.Origin()` and `TestClient.ok()`.

Change the `{ServerError, IncompleteError}.host` field types to
strings.
Expose `decoderFn` as `DecoderFunc`.
`Conn.Register()` should call `conn.addChannel()`.

This allows custom decoders to override the default `"register"`
decoder.
Add `Conn.SpoolAll`, `Ping{Interval, Deadline}`.

If the `SpoolAll` option is set, notifications sent on unregistered
channels will not be dropped. This is useful for testing, but should
be moved to a higher-level client in the future.
`TestClient.Notify()` => `Notify()`.

`TestClient.waitAll()` now returns `ErrChanClosed` if the notification
channel is closed prematurely.
`Reply.Id()` => `Id() (string, error)`.

This change allows anonymous packets (`ClientPing`, `ClientPurge`, and
`ClientACK`) to return errors instead of a sentinel `"*"` ID.

Add an internal `requestWithErrors` interface for testing.
`Conn.fatal()`: Avoid overwriting `lastErr`.
`Decoder` interface changes.

* Change the `Decode` signature to `(*Conn, Fields, int, string)`.
* `Conn.readMessage()` now calls the decoder function before returning
  a `ServerError` for typed error responses. This allows decoders to
  return custom errors.
* Extract `"update"` packet decoding logic into `Conn.decodeUpdate()`.
* Remove `decodePing`.
Add `{Valid, Decode}Id()`.
Refactor `TestClient`.

* Remove `clientState` and the connection state machine.
* Add `TestClient.{subscribe, notifyAll}()`.
* Add `PushThrough()` for receiving and acknowledging multiple
  notifications on an existing client connection.
`Request.Id()` now returns `(interface{}, error)`.

* Update the `Requests` map type definition.
* Add an internal `requestWithMarshal` interface for describing
  serializable requests. Custom request packets no longer need to
  explicitly implement `json.Marshaler`.