Optimized header map implementation and tests

Complete with fast iterator support.