Fix race condition index creation

before this patch all createIndex calls set the ready state flag to true using the same key (createIndex), so if more than one index was created then when the first finished it seemed from the outside as if all of them finished.

the fix calls setReadyState with the indexName as key so it's different for each one.

it also moves the waitForReady outside of getStoreProps to the functions that call it since it received a transaction, if waitForReady actually calls to setTimeout you may get an error running the sql query.

finally it wraps throwDOMException and if creating the DOMException fails it throws an Error instance instead of failing with invalid constructor exception which looses the reason of the initial error.

feedback welcome.