Allow operations on database before it is opened

No longer needed to wait for the ready event to start interacting with
the database. Instead, the returned promise will be paused until the
database is successfully opened.

This makes it easier for application code since there is no longer any
requirement to wait for db.ready() before doing stuff with the db.  For
example, the code executing when an onclick event fires on a create
button can directly do db.put(object) instead of always having to do
db.ready(function(){db.put(object);}).