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>