Code improvements + support 9-bit interface

Use a 9-bit interface when using a 16-bit SSD1289 or HX8532A display.
The upper 8 bits are latched in an external 74HC373 latch. This code is
currently only implemented for the atmega32u4 (Arduino Leonardo).
Changed some char variables to uint8_t so that the effect of bitwise
operations on them is properly defined. This also reduces the code size.
Added function LCD_WRITE_COM_DATA8 to further reduce code size when
using HX8532A controller.
Separated display type and transfer mode

The display type and transfer mode are now passed as separate
parameters. Also tidied up the code to save space and move towards MISRA
compliance. I don't have a PIC to test on, so the PIC version will no
longer compile.
For 9 bit mode pass latch pin # as last parameter

The final constructor parameter, which was the 5th serial interface pin
#, now doubles up as the latch pin # for 9-bit mode