Fixed bug in usage of std::queue and std::map.

From misreading the stdlib documentation, I thought that calling pop()
on a queue storing pointers was calling the destructor of the pointed
element. Obviously I was wrong, and introduced a bug in f8373a, which
is now fixed. I verified the actual behavior of std::queue by coding
this simple example:

 #include <queue>

class Stuff {
 public:
  int num;
  Stuff(int num_in): num(num_in) { printf("ctor %d\n", num); }
  ~Stuff() { printf("dtor %d\n", num); }
};

int main(int argc, char **argv) {
  std::queue<Stuff*> q;
  q.push(new Stuff(1));
  q.push(new Stuff(2));
  Stuff * s1 = q.front();
  q.pop();
  Stuff * s2 = q.front();
  q.pop();
  printf("done with queue\n");
  delete s1;
  return 0;
}