Fix database error undefined on Chrome and count returns IDBRequest instead of result

Without checking the documentation I don't know who defines errorCode and webkitErrorMessage, but on Chrome it is e.target.error.message. You'll notice e.target.error.message was used in onTransactionAbort(), but omitted in onTransactionError() and onDatabaseError()