Add lock assertion decorators

Just to double check. For example, add_feed should always be called with
feed_lock. Should probably be debug enabled.
Cleanup thread debug output

Give the threads names instead of insane IDs, find and print them in
summary form so it's easier to tell what backtrace is holding what locks
with what permissions.