with calls specific to the appdb or bugzilla database. Fixes a bug where a call to
mysql_insert_id() can potentially retrieve an id from either the bugzilla or appdb database,
depending on whichever database was last opened by mysql_connect().
let us more easily debug difficult or intermittent issues that users may not report. Add a cron to report logged
errors to appdb admins every night. Implement some basic unit tests for the new error logging code