arvind,simij | #147 | Added tests to metadata sync. Extracted wrappers for indexedDB and $.ajax