change common bag test code so it can be effectively used for SortedBag testing (using intermedia SortedBags for copies that maintain sort order for passing into test function); and partly got sorting owrking for sorted bag