automated database trimming

- datahandler raises an exception if a write is issued when one is in progress
- exception handled in run loop, by shutting down stream and calling...
- database now has perform_maintenance method that archives old tweets
synchronicity and better closing of datahandler