General cleanup and logging to file.

Logs to hwtest_log.txt, and it logs more specific things to the file than it would display to the screen, such as SoftAssert failures.

Cleaned up some stylistic issues that remained, and added a "common" folder for general useful functions.