Fixing hyperrectangle and hypersphere intersection checks
Bugfix in rotating through dimensions, bugfix in pivot selection when equivalent medians exist. Will infinite loop on duplicates.