Merge pull request #209 from whirm/watchdog_rename

Rename _watchdog to _flush_database (not really a watchdog)
Move on_incoming_packets, batching and its auxiliar functions to
community.py
Also remove obsoleted tests.