code: give scaling factors names

It would be very useful if JS had F# / C#-style units and unit
converstion built into the language, but I can at least help mitigate
future magnitude errors by naming the conversion factors related to time
so that it's clear what's happening and why when converting between
seconds and milliseconds.
code: eliminate serious memory leak

See the new comment in the commit; tests need to track and clear out the
instrumented methods between runs, but in production code this will lead
to really bad memory leaks. Only track references when mocking
instrumentation.
tracer: exclusive duration is a param on segments

Instead of hardcoding in an nr_async_wait parameter for each trace
segment, report the segment's own calculation of its own exclusive
duration as a new parameter on the segment,
nr_exclusive_duration_millis. This performs the calculation at
serialization time, which allows the trace segment (or its children
to still be in flight, which NR may or may not want to nail down at some
point).
tracer: fix exclusive time calculation

Before the calculation method only took into account immediate children,
not further descendants, instead of recursively enumerating and
filtering all of them. Split the enumerator out into a separate function
and then use every Array function defined in ES5.
api: added two naming functions

Here are the first two methods on the exposed API (not yet wired up to
the agent, because there are some probably unrelated test failures to
clean up first). Doing this provided an opportunity to do some
simplification and refactoring of the naming and normalization functions
related to the API, along with putting in place the backstop.
test: mocha's gotten pickier

It wants to use an uncaughtException handler more. The error tracer
tests probably need to be ported to tap.
test: make utility function more stringent
api: require('newrelic') now returns API instance

This also limits exposure to the guts of the agent to casual users.
doc: rationale for segment.partialName

Also note why both segment.name and transaction.scope are set in
nameAndNormalize.
instrumentation: Express 3 router introspection

Assigns scopes to the transaction with the pattern
'WebTransaction/Controller/Expressjs/<route>'. Converts regexps into
their sources. Takes any parameters passed along and assigns them to the
web trace sgement's parameters.
instrumentation: Express 2 router introspection

Does some risky business to get around Express 2 not directly exposing
the Router constructor, but is otherwise identical to Express 3
version.
instrumentation: Restify router introspection

Follow the Express 2 pattern to get access to the Router, wrap the
callback to find to do the naming, set up some new versioned Restify
tests just in case issues come up later.
instrumentation: remove unnecessary unset

Didn't notice that the instrumentation was being applied inside a
function's scope and so would automatically be eligible for GC.
api: add support for naming and ignoring rules

Mostly reuses the metric normalization code, although the exposed API
surface is way cut down, and may need to be further cut down if too many
apps abuse the flexibility of capture groups and replacement strings.
config: add support for naming and ignoring rules

This required creating a new configuration type for environment
variables (for lists of objects, which are kinda ungainly but what you
gonna do), as well as a new bit of logic for determining whether to
merge or recurse when overriding core configuration (when there are
config values that are arrays).
metrics: backstop all non-normalized URIs

Instead of /WebTransaction/Uri/whatever, they're not
/WebTransaction/NormalizedUri/*. This is going to look really weird
until people start using transaction renaming of one kind or another.
config: backdoor the backstop

For at least the period of the beta, add code-only support for disabling
the hard URL -> /* backstop.
metrics: simplify metric normalization

Before there were objects being created all over the place and
transactions being passed where they shouldn't and everything was just
way too complicated. Now, instead, we have a simple interface that just
turns paths into partial metric names (or nothing, if the transaction is
to be ignored).
code: Transaction.prototype.setWeb was unnecessary
transaction: move naming onto transaction

Moves lib/transaction/web.js back to being a pure utility class (that
also now has the funciton that determines whether an HTTP status code
denotes an error).