Add thread aware backtrace signal.

Found a snippet on the web awhile back that's been useful enough to
implement as a log.info() backtrace when the daemon gets SIGUSR1.

Signed-off-by: Jack Miller <jack@codezen.org>
Add coarse grain locking to storage.py

The daemon has relied on logical separation of the Feed structures and
keys in the storage to maintain thread safety. This would work well for
reads and writes, but there is still one place threads can stomp on each
other: the open/close state of the database. By locking these
operations so that nothing can occur during a trim (the only time the
database is closed during normal operation of the daemon), we can avoid
any failed calls because the database is closed.

Signed-off-by: Jack Miller <jack@codezen.org>