support IE implementation of indexedDB and running the code inside a google chrome packaged webapp

- IE implementation of indexedDB does not support putting null values (tested on IE11), this commit make it put undefined value instead of null value
- google chrome packaged webapp aren't allowed to access window.localStorage API which can throw an exception and stop loading the file:
    Uncaught window.localStorage is not available in packaged apps. Use chrome.storage.local instead. extensions::platformApp:14
    Uncaught ReferenceError: localForage is not defined 
the commit will set localStorage to undefined when running inside an google chrome packaged webapp without exec
"localStorage = window.localStorage;"