Port 256 Color, 216 Color and Grayscale modes from termbox.c.

This includes the change to attributes to support bold, underline and reverse.

The only thing I really changed from the C version was output.go to better show what the higher colour depths can do. It allows switching output mode with the arrow keys, and all output fits into an 80x24 terminal.
This doesn't look right to me, but i copied it directly from termbox.c. If this is wrong, it should probably be fixed there, too.