add a couple of helper functions to base for deleteing all pointers in a container and outputting containers to a stream