Most work by Ruslan Popov, collected from various commits and made compatible with regression tests by Traumflug. Display test code is now enabled by #defining DISPLAY_BUS to i2c_twi.