Make Travis fail the build immediately in some cases

Travis will fail the build if:

  - flake8 doesn't exit with 0
  - unit tests don't pass
  - documentation fails to build
Fix QTimer messages on unittest completion

Resolves the messages that appear at the end of unittest run:
    QTimer can only be used with threads started with QThread

Signed-off-by: Thanh Ha <thanh.ha@alumni.carleton.ca>