Add getAllKeys and flush()

getAllKeys() => Wrapper for getAllKeys from the API.

flush() => provides ability for testing to flush and wait on the DB transactions for completion much similar to the way that you may do $httpBackend.flush().