Bug 836542 - 2/5: Separate database/service code. r=gene
Bug 836542 - 3/5: Allow muliple stores in IndexedDBHelper.newTxn().
Bug 836542 - 4.a/5: use IndexedDBHelper. r=gene
Bug 836542 - 4.b/5: remove ensureDB and refactor upgradeSchemaN. r=gene
Bug 836542 - 4.c/5: remove newTxn and fix init(). r=gene
Bug 836542 - 4.d/5: fix saveMessageRecord(). r=gene
Bug 836542 - 4.e/5: fix updatePendingTransactionToError(). r=gene
Bug 836542 - 4.f/5: fix getMessageRecordByTransactionId(). r=gene
Bug 836542 - 4.g/5: fix getMessageRecordById(). r=gene
Bug 836542 - 4.h/5: fix deleteMessage(). r=gene
Bug 836542 - 4.iA/5: refactor updateMessageDeliveryById(). r=gene
Bug 836542 - 4.iB/5: fix updateMessageDeliveryById(). r=gene
Bug 836542 - 4.j/5: fix markMessageRead(). r=gene
Bug 836542 - 4.k/5: fix createThreadCursor(). r=gene
 Bug 836542 - 4.l/5: fix createMessageCursor(). r=gene
debug