Work around iOS 8.0 IndexedDB initial schema upgrade bug

According to WebKit Bug #136888, the initial schema version
value when a new IndexedDB database is created is large and positive
instead of 0 or undefined.

Work around this by returning 0 as the 'old' schema version
if the value appears to be invalid.