Fix a couple of compiler warnings

With the colour prompt support.
Also recognize '\e[m' as an escape sequence.
Simplify countColorControlChars().

Signed-off-by: Steve Bennett <steveb@workware.net.au>