Improved startup code when streaming into database

Hans' code solved the non-db streaming bug that I introduced earlier, but while
he pointed out the mistake that my code kept storing the vehicle information
every 15 minutes or so, he didn't actually prevent that... so with this code
the whole thing is easier to read and does the right thing. Store vehicle data
only once and only do any of this if storing to a database.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>