Load files in background thread

All files are now loaded in a background thread, to avoid the GUI
freezing.  Also contains a major refactor of the logging system, which
was required to make it threadsafe.

* New FileLoader class which is executed on a separate thread to load a
  set of files.

* New Logger and LogViewer classes which collaborate to make
  multithreaded logging safe and convenient.  Remove the horrible hack
  used to capture and redirect std::cout.

Closes #20