A framework for hierarchical single-copy MPI collectives on multicore nodes