Ported over from http://trac.wildfiregames.com/ticket/4347
EntityMap, our fast replacement for std::map<entity_id_t, V> was coded by RedFox. As such, it's weird. It uses a C-like buffer, and is generally not very nice.
Attached patch replaces all that with an std::vector and removes the "inline" everywhere and generally makes it nicer. Also adds a "start ID" information to avoid having a useless invalid member in front.
I also add tests (I believe I've got 100% coverage) and test performance.
(NB: the patch keeps the old entity map for purposes of performance comparisons (it's never worse, perhaps even better), obviously that would not get into svn).