Added the remap_cube_dimensions utility function to handle removal and addition of new dimensions.

I've needed this functionality a couple of times, and finally needed it for the implementation of my linear interpolation work, therefore this is a per-requisite of being able to merge that (I will put up the PR before that though).