Tests and Storage

Added a test for the situation a measurement has no sub calls.

Changed `SQLiteStorage` to properly encode the `None` sub calls.
Changed `SQLiteStorage` to properly encode the `datetime` in sub calls.