rescale fix

This PR fixes the bug in `rescale` behaviour of `MaskedImage` class. In short, the problem arises due to numerical errors in the coordinates of the boundaries. In order to fix this, this PR changes the default mode of `scipy_interpolation` from `constant` to `nearest`. 
The PR also adds a test to ensure that the bug doesn't appear again in the future.