Refactoring search results and message tree
Fixing a bunch of buglets in or revealed by tests
Moving date formatting and other things into util.py
Fix CLI search view after json format changed