Bug 963817 - Wrap HomeStorage data insertion loop in a transaction (r=margaret)