Optimization of resample_img()

The memory usage of resample_img() has been reduced, by removing usage of the infamous numpy.concatenate function. The resulting function is also very slightly faster (5%). 

The overall function structure hase been clarified. Some tests for error handling in resample_img() have been added as well.