More cleanups, and removal of colour map support

This builds on the earlier cleanup, but is a bit more invasive.

The major change is the removal of colour map support. This is done as colour maps are extremely rare these days, and having that support adds a lot of complexity to the code.

We are still fully interoperable with other clients that require colour map support (servers are not a problem as they are required to support true colour mode). What we lose is the ability to write a client or server that works on a system with a colour mapped frame buffer.