made sure transactions close and pooled connections work

the loop in StateDatabase did not commit its transaction, so when Pooled Connections were used, there was a deadlock when running tests.

In addition, there is no task executor (socorro's multithread/singlethread/greenlet controller) so there is no 'executor_identity' function.  I reverted that back to getting the thread name.  That allows this class to be used in a multithreaded context - even though we don't now want to - it's better to write safe code than not.