WIP on switching from Influx to Elasticsearch
Merge branch 'HTTPLiveStreaming' into SwitchToES
WIP on porting analytics to ES: Get tests passing

* Starts, listens and sessions are now stored in ES
* WIP on adding Redis / memory duration tracking to analytics writer
Reimplement listener counting in ES; Add db support to Redis connection

* Reimplement listener count endpoint in Elasticsearch. For the last 15
  minutes, gives requests, sessions, average listeners and per-stream
  requests.
* Redis: If a db number is specified in the server path, select it before
  returning the connected event.
Analytics: WIP on finalizing sessions

* Add finalize strategies for memory and Redis
* FIXME: Test Redis strategy
Tweak Redis DB selection; Fix Redis cached duration

* RedisConfig: Fix the path to select a database other than 0
* Analytics: Round duration values to integers before storing them into
  Redis, so that `incrby` doesn't object
Analytics: Tune down a few log messages
Master: Fix unsynced test for empty buffers
Add `/api/stream_groups` endpoint; Rip out more old listeners code

* Add `/api/stream_groups` endpoint to list groups and sources
* Rip out more of the old slave-reported listeners code
Put test redis config on a different db
Analytics: Query against the proper date-based index range

* Add `_indicesForTimeRange` function, which returns an array of indices
  corresponding to the chosen time range, making sure our queries don't have to
  cross too much data.
* Store session time as the last listen, not the start time. Cleans up sorting
  and is more in-line with traditional logging
Merge pull request #25 from StreamMachine/SwitchToES

Switch analytics to Elasticsearch