Ensure missing period is treated consistently

Add a new test to ensure that all of the storage drivers
return a consistent value for the period.

Fix the SQLAlchemy driver so it returns 0 for the period
if no period is provided in the input to the query.

Change-Id: I3bc272aea1fd1ce29953d2080b58d75f5373513a
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Merge "Ensure missing period is treated consistently"