Change semantics of pop() to support specifying key to remove.