tornado: Fix bugs in Tornado autoreload library.
tornado: Fix bugs in Tornado autoreload library.

This fixes two issues:

* The syntax check logic we had for zerver.tornado.autoreload would
  end up clearing _reload_hooks if one of the files that had changed
  was zerver.tornado.autoreload itself (because we'd had re-imported
  the current module), which could be incredibly confusing when trying
  to test the autoreload logic.  It seems better to just not run the
  syntax check for syntax errors in this file.

  Similarly, because reloading event_queue.py would destroy the state
  in the queues, we avoid that as well.

* We make sure to flush stdout after running and reload hooks, to make
  sure their output reaches the user.

tommyip/zulip,brainwane/zulip,tommyip/zulip,hackerkid/zulip,hackerkid/zulip,showell/zulip,tommyip/zulip,kou/zulip,brainwane/zulip,timabbott/zulip,brainwane/zulip,andersk/zulip,synicalsyntax/zulip,rht/zulip,zulip/zulip,brainwane/zulip,timabbott/zulip,kou/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,zulip/zulip,andersk/zulip,kou/zulip,tommyip/zulip,eeshangarg/zulip,tommyip/zulip,eeshangarg/zulip,brainwane/zulip,shubhamdhama/zulip,andersk/zulip,zulip/zulip,punchagan/zulip,timabbott/zulip,eeshangarg/zulip,brainwane/zulip,punchagan/zulip,eeshangarg/zulip,andersk/zulip,timabbott/zulip,punchagan/zulip,synicalsyntax/zulip,eeshangarg/zulip,rht/zulip,synicalsyntax/zulip,eeshangarg/zulip,rht/zulip,showell/zulip,andersk/zulip,punchagan/zulip,rht/zulip,synicalsyntax/zulip,timabbott/zulip,andersk/zulip,shubhamdhama/zulip,hackerkid/zulip,eeshangarg/zulip,zulip/zulip,zulip/zulip,showell/zulip,andersk/zulip,tommyip/zulip,hackerkid/zulip,rht/zulip,zulip/zulip,shubhamdhama/zulip,punchagan/zulip,showell/zulip,synicalsyntax/zulip,shubhamdhama/zulip,showell/zulip,synicalsyntax/zulip,showell/zulip,timabbott/zulip,timabbott/zulip,hackerkid/zulip,zulip/zulip,brainwane/zulip,shubhamdhama/zulip,showell/zulip,shubhamdhama/zulip,shubhamdhama/zulip,kou/zulip,kou/zulip,punchagan/zulip,hackerkid/zulip,tommyip/zulip,synicalsyntax/zulip,kou/zulip,rht/zulip,rht/zulip