Use upsert with custom id for improved mongo insert performance.

Evaluation of the performance shows that timeouts were occuring during
processing of the OIDs because the writes to mongo occur in step with
the OID reading, and the monogodb engine ended up taking up most of the CPU.

The find / save nature of the process had more overhead than necessary.
The new approach uses a generated (and guaranteed to be unique) custom id
and uses the mongo upsert feature to automatically create/update the
data as necessary.

In my tests (4 threads, SSD) this shows about a 3x performance improvement
and greatly reduces the device read timeouts occuring.
Add extra error logging / configurability

 - Fix bug with initiation of scanner for missing variable
 - Add logging and error handling to make future debugging easier
 - Making timing between scans configurable
 - Standardize on 'time' objects for start times and intervals
 - Fix bug from last commit which caused oid timestamps to be overwritten
   instead of updated
 - move from forced save of mongo data to upsert / update when possible
Change default to conservative timing
Merge pull request #1 from lefticus/master

Performance Improvements for BACnet-state