Indexed Transparency handled for conversions between L, RGB, and P modes

Fixes #510

Includes #573, since I was going to have to manually merge anyway.