Improve CMapFor.

CMapFor is now break-friendly, meaning that you can break out of it
without leaking memory, which was previously not the case.

I've also confirmed that it is robust to resizings during the for loop,
which was already the case. I suspect I ran into this as a bug a while
ago and fixed it back then.