address Paul's comment about CompactingMap.h, but didn't delete the insert(std::pair) because the dependency of eecheck
use template to handle the PointerKeyType
remove unnecessary cast in indexkey.h