collector: callback-based RemoteMethod

RemoteMethod is the callback-based replacement for DataSender. Also
includes a single-file version of protocol validator as a fake collector
for integration tests.
util: StreamSink invokes callback on error events
collector: convert NR:: exceptions into JS errors
collector: facts sent on connect come from module

Before this was just an inline object. Splitting it out into a function
call allows it to be tested, which is a form of documentation of the
contract between the agent and the collector. The test suite also makes
sure we don't change that handshake information without updating the
test documentation to match.
test: mock agents need to follow app name rules
collector: require return_value on remote calls
collector: add .connect(), with retry logic

Short-circuits retries upon learning its license key is invalid,
but otherwise follows the same retry pattern as the Python agent.
collector: put response parsing in one function

...and then put that function in its own file, and give it its own
tests. The response parser is as resilient as I could make it, and
unifies errors on the response stream, JSON parsing errors, exceptions
sent by the server, and non-OK HTTP status codes. It also tries to
extract data and pass it along whenever possible, even when there are
errors. This allows remote method invocation and the collector API to be
more flexible, as well as ensuring that errors all have certain
consistent properties.

Accumulating all the errors and passing them along allows the
higher-level API to provide a complete transcript of what went wrong
with a particular set of calls to the collector, which should make the
logs much more informative to support and the dev team. It also
simplifies the code a little more, which is a nice bonus.
collector: fill out public API

I've gotten a little head of my tests and will have to catch up, but
there are tests for the most important new chunk, which is
_runLifecycle, which will call a method and then deal with common
responses, including discarding bogus requests, reconnecting on
ForceRestartException, and shutting down on ForceDisconnectException.

I added a small optimization, which is that there's only one instance
of each remote method. This should save a tiny bit of GC, but it was
easy to do, so I just went for it.
agent: cut over to new collector API

Many, many more tests need to be written, but this is already better-tested
than what it's replacing.
agent: minimize evented code
config: simplify logger-config dance

Dealing with cyclic dependencies is hard, but having a bunch of largely
redundant boilerplate in many places is gross. This still doesn't solve
the basic problem of config and logger depending directly on each other,
but without bunyan supporting the changing of log locations and types on
the fly, this is about as clean as it can be.

Also cleans out unnecessary layer of config wrapping for initialize. If
you're passing a configuration object in, it really shouldn't be
necessary to have that wrapped up inside the object in a property named
'config'.
src: FROM_MILLIS -> 1e-3

Why is IEEE754 so haaard?
test: improve coverage of agent start method
sampler: state is now observable

Added for testing, but maybe useful for some kind of health check
function down the road.
agent: increased test coverage / testability
agent: responsibile for serializing data, not API

Also added documents to all the methods in the API and the agent.

Figuring out which piece of the module is responsible for which
functions has bedeviled me for most of the last two years. The agent
acts as a mediator between the collector API and the rest of the agent,
and the API should map as closely to the collector's view of the world
as possible, which implies that it's in charge of marshalling data and
handling the responses sent by the collector, not being responsible for
formatting that data.

At the same time, in order for the API to be able to seamlessly
reconnect to the collector, it needs to be able to update the module's
configuration. The API's view of configuration is read-only, and to
preserve that decoupling, the agent needs to expose a method the API can
use to request an update to the configuration.

So I had to move a bunch of logic between the API and the agent, and the
result complicates the logic in the agent, but everything that is in
there now is where it belongs, and the API is much simpler as a result.
agent: harvest at startup if there's already data

Start the sampler earlier in the startup phase and also clean up the
tests that were still using _connect.
agent: nuke restart -- API handles restart itself
test: increase coverage to 100%