Re #8686. Added real filename and line number when emitting errors.

Required a small refactor of the code. Hopefully the additional
comments help out.
Re #8686. Added error report to ApplicationWindow.

This was done by adding a slot for the error signal and turning
it into a log message and exiting.
Re #8686. Added check for PyErr_SystemExit for builds.
Re #8686. Fixing bug found in testing.
Merge remote-tracking branch 'origin/feature/8686_mantidplot_returns'