This reduces some hoops that had to be jumped through to get the proper indexes to retrieve contacts
Also add flush method to converse.js (used in ClientStorage tests)