Re-implement interpolation functions for scaling

Fix for issue 295, there was, what amounts to an off by one error in the
original code, which was causing the problem in issue 295.

This error was probably not very noticable in larger images, but as
pointed out by the bug report smaller images may contain more distortion
than necessary.

Also replaced bilinear interpolation function with a new implementation
that handles smaller files better and more closely matches with output
from other software.

Also added unit test for resize methods, however the bilinear test only
checks using RGB, and not the other ImageTrait types. (This is next up)