ENH: Allow ravel to reshape in place when possible

This fixes a lot of corner cases in reshape 'K' when the array
is not contiguous in the first place, it was previously never
ravelled in place.

Closes gh-5033
Merge pull request #5034 from seberg/inplace-ravel

ENH: Allow ravel to reshape in place when possible