Remove Pair type, use builtin dict to store values

This gives a better performance. I've stolen the idea from
DanielStutzbach/blist.