Add support to stream to a MongoDB database

This modifies streaming.js to switch to 'database mode' if the --db option is
given. In that case we add the streamed data to a local MongoDB database. The
mongodb JS module needs to be available (but is only required if the --db
option is given).

In order to do this the '.pipe(...)' method was replaced with '.on('data',...)'
which appears to be functionally equivalent (but I worry if there are subtle
differences).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Allow visualization of tesla streaming data on a map

Simply call

node ./visualize.js --db <database bane> --replay <number of minutes back>

to start the server and then point a web browser to

http://localhost:8766

This will show a Google map with the position and some statistics on the car.
By giving the --replay argument you can go back in time and visualize the path
the car has taken. This runs at roughly 30x speedup. The map keeps updating in
real time as long as the server process is running.

The color of the track visualizes the speed driven. Slower speeds are shown as
shorter wavelength (with parked being a fairly deep blue). Faster speeds in
longer and longer wavelength with speeds above 65 being solid red.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge pull request #2 from dirkhh/mongo

Add support to stream to a MongoDB database