Added interface for setting and querying the interpolation mode.

This is new stuff and one of the functions here was added by me, so this
clearly doesn't work on stock LibGD.