the generic getSplits method that first gets all regions, and they the regions to get key ranges.