Separate the OutputDevices class from the *screen* sources into a library
and add some initial test cases.
This does not contain any logic changes needing review. It's just been
copied and pasted between source files to enable testing.
Approved by PS Jenkins bot, Daniel van Vugt, Sam Spilsbury.