Add support for 3-digit hex color codes

An alternative notation for hexadecimal colors is to supply a single
digit for each channel, whereby "abc" represents "aabbcc". A 4-digit
notation could follow this pattern in denoting opacity, but the idea
doesn't seem to have caught on, so those are not implemented herein.

This patch includes a moderate rewrite of ChunkyPNG::Color.from_hex
that might not be to your liking, but all the tests (including the
new ones) pass, and there's no significant change in behavior.
Implement various suggested fixes.

* Use separate regexes to parse short-form and long-form notation.
 * This prevents the error cases of trying to parse 4- and 5-digit codes.
* Use \A and \z to match the beginning and end respectively.
* Prefer twiddled bits to manipulated strings.
 * There's still some string manipulation, but $1 is already a string, so
 * this seems to make a bit more sense than converting it before the math.
Fix 1.8.7 Fixnum#hex error.

We call #hex on each character of a 3-digit color code, but indexing
into a string in 1.8.7 returns a Fixnum, for which there is no #hex
method. The solution is to first convert it back to a string.
Use string manipulation for base color calculation.
Fix when/else alignment.

The `else` was a whitespace-only change that didn't get picked up by my previous commit.
Merge pull request #50 from threeifbywhiskey/3-digit-hex

Add support for 3-digit hex color codes