Allowing mongodb authentication
Making auth/no-auth callback handling a little better
Merge branch 'master' into mongo-auth
Add support for replicaSet mongo setups by passing in an array of server parameters in the form of [<hostname>, <port>, <options>]

eg.
[
	['db1.domain.com', 27017, { auto_reconnect: true, slave_ok: true }
	['db2.domain.com', 27017, { auto_reconnect: true, slave_ok: true }
	...
]
Disable batchSize on metric queries.

As best I can tell, this was causing it to return no more than 1,000 results,
even though the intent was to paginate after the first 1,000. Fishy.
Update mongodb driver.
Restore batchSize with proper sort order.
Replace 20-second tier with 10-second tier.

This matches Graphite's default, which is useful for comparing metrics from
multiple backends. This also disables computing 5-minute metrics from the 10-
second tier, since for low-frequency events this is vastly more expensive than
computing the 5-minute metrics from the events directly. 10-second metrics are
still available if desired but they are no longer created as a side-effect of
requesting 5-minute metrics. Ideally, Cube could determine automatically whether
to descend to the next tier based on the number of events in each time interval,
but that'll require a bit more effort to implement.
Fix references to 20-second metrics.
Log the URL's query string, too.
Serialize metric computation.

Now when multiple requests for the same metrics are received concurrently, only
the first request will do actual work, and the other requests will return the
cached results.

This commit required two non-backwards-compatible changes. It removes group
query support (which was only partially supported, and could crash the server by
running out of memory), and the metrics WebSocket endpoint now emits `null` when
the last metric is reported. This makes it easier for clients to detect when all
metrics are available.

In the future, I'd like to reconsider grouped queries, perhaps by providing a
new endpoint that returns metadata about events. For example, it could query
events and return the cardinality of different properties, or the top values.
Given the metadata, the client could then generate the desired queries and
choose the appropriate visualizations.
Detect collectd's high-resolution time format.

There was a brief interval during which collectd used the high-resolution time
format in conjunction with JSON. That is no longer the case. To support both
versions, we must now guess which format collectd is using. If the specified
date is more than ~31.7 years in the future (1e12 milliseconds), then the date
is assumed to be high-resolution and divided by 1073741824. Otherwise, the date
is assumed to be in seconds since UNIX epoch.
Merge branch 'mongo-auth' of https://github.com/mrkurt/cube into 0.2.0
Minor cleanup to authentication code.
Process task queue in FIFO order.

The previous implementation was LIFO, which meant that frequent small requests
could easily stall rare longer requests. I still plan on changing the queue so
that only metrics for the same unary expression are serialized.
Serialize unary expressions by event type.

Rather than serialize all expressions, only serialize unary expressions of the
same event type. This allows expressions on different event types to proceed in
parallel, hopefully improving performance while still avoiding redundant computation.
Add some simple metrics.

You can now query /1.0.info to get some basic metrics from Cube and diagnose
what's going on internally. For example, you can see the number of metrics that
have been computed by event type and metric tier, and then compare that to the
number of metrics that were cached.
Invalidate metrics with greater precision.

Previously, the collector would track the minimum and maximum time for events
received over five seconds. Any metrics between these two times would be
invalidated. While simple, this approach has unfortunate behavior: a single
outlier event (say, from a year ago) that arrives concurrently with a current
event will wipe out all computed metrics! Now we track exactly which metric
intervals are affected by incoming events, and only invalidate those.
Fix a bug with incorrect stat recording.

Pyramidal metrics are computed recursively, so we were incorrectly attributing
computed metrics to the outermost tier, rather than the innermost tier.
Automatically reconnect on close or error.

Emitters will now retry automatically when an error occurs.