Refactored reshape_to_Ndims
Refactored reshape_to_Ndims

Extracted two methods from reshape_to_Ndims:
  get_sort_order returns the order of rows in a dataset or array from fastest changing to slowest
  get_dimensionality returns the number of unique elements in the rows of a dataset or array

pycroscopy/pycroscopy,anugrah-saxena/pycroscopy