Implements binary heap pop, tests