Fix Database error: undefined and count returns IDBRequest instead of result

In Google Chrome e.target.errorCode is undefined. Adding e.target.error.message fixes the Database error: undefined I received when upgrading the database and the transaction was aborted. The same change was made to the onTransactionError function assuming the same applies.