Added pull method to Collection class

Added a pull method to the Collection class that, when given a key, returns the value from the collection and removed it. This works much like the pull method in the cache repository does.

Based on the proposal by @luukholleman at #4450.