change set to list in reduce_all_in_group

add some comments
working towards a new reduce_all_in_group
make a new algorithm for reduce_all_in_group which should scale better
deallocate ngt in python wrapper