Fix miscellaneous warnings.

Mostly these deal with operator precedence.  A few of them were bugs.
Enable TEXTCOLOR for OS X and Linux.
Enable TERMINFO on OS X and Linux.
Accept AF as color attributes.

NetHack 3.4.3 does it this way.
Use m_end to end highlighting.

Necessary on OS X; the HE string does not reset the color.
Save shuffled object names by index.

This change enables for all platforms a Mac OS (prior to OS X) feature by which
shuffled object names are saved by index, and reshuffled on restore.  This
proved necessary to avoid mysterious segfaults on OS X and is probably a good
idea on all other platforms.

This change breaks save file compatibility.
Remap the colors for the OS X terminal program.

The bit order for red, green and blue needs to be reversed to blue, green and
red.