Introducing StringMap to clean up duplicate check code

https://code.google.com/p/esprima/issues/detail?id=585

This branch depends on #279 and #280.