Remove TerminalWidget usage in TerminalEmulation

Instead the connection between TerminalEmulation and TerminalWidget is
done using signal/slots.

This also makes the added unit test possible.
Merge branch 'master' into wip/write-to-display

Conflicts:
	lib/terminalemulation.cpp
	src/mainwindow.cpp