Abstract out DbStorage superclass from BasicDbStorage and RevisionStorage.

Also make sure that RevisionStorage has the security improvements from 64bf13a

Change-Id: Ia00a6f96f3ac23085f43b5f6bfc8bae88b8e21b0
Merge "Abstract out DbStorage superclass from BasicDbStorage and RevisionStorage."