Added autoCommit on settings and callback after localStorage is done writing.

I added a commit function in-line with store so it enables more controll
on localstorage access. I also added the callback in case the
commit/store to the localstorage is completed.

Without this it is hard to know the timing on when the data was written
to the local storage since it is asynschronous. I noticed this when i
wrote a qunit to test db creation-write-access-cleanup. Access part
always failing due to timing problem.

We dont want also to keep on writing the data to localstorage everytime
the data was modified. This can be a performance issue.