Bug 985728 - Improve storage access time by leveraging indices

Added helper methods to DB to look up object by indices or key.
Changed sync processing loop and other places to use index/key look up.