Code Cleanup and Error Handling

Task 389:

Cleaned up some code, put in a catch for setupdb if table already
exists, it won't create a table, put in some error handling for the
tests.

Created custom errors, another file "errorhandling.js" to handle
putting errors into local storage and organizing them by number (Error
1, Error 2, etc)

Since db.transaction is asynchronous, typical try…catch scenarios don't
work with single function calls, so I've nested each test within the
success / error functions of each transaction. IE if the transaction is
successful, it runs the next db.transaction test, if error during
transaction, then it throws an error and gets out of the function.
These tests will be run after any synchronous tests that don't depend
on sql query from the local db