Fix #248 : add better algorithm for thumbnail resize + add filter argument to ImageInterface::thumbnail method

This should make thumbnail quality a lot better.