Make actor::end_constriction take an mid_t.

Since it is not responsible for removing the actor from the
constricting map, it does not need to take an iterator.
Add a couple of missing breaks.
More C++11ification and several helper functions.

New template functions:
  random_iterator:  get a random position in a container
  erase_val:  find and remove a value from a container
  grep:  return a copy of a container, filtered by a predicate