Full HSL support for tinting

The code removes the lookup table caching of lightness values and replaces it with a full rgb -> hsl (tint) hsl -> rgb method.

Additionally it fixes a few compiler warnings and fixes the overflow reported in #27.