Fix exception in Table::loadFromProject.

Refs #9970.
Refactor TableStatistics project loading.

There still appears to be a bug with this though, where a statistics
line is prepended to the statistics table upon project load. It's most
likely being added when the statistics table is being created.

Refs #9970.
Tidy up logging.

Refs #9970.
Tidy up project loading a little.

This commit tidies up a few rough edges that I had left behind.

Refs #9970.
Merge ApplicationWindow::loadScript overloads.

The overloaded version should just use a default parameter.

Refs #9970.
Tidy up ApplicationWindow.h a bit.

This commit does not contain any functional changes, and should not
change any behaviour whatsoever. It is merely tidying up
ApplicationWindow's header a little bit.

Refs #9970.