Refactor building perfect hash tabels for tokens

moved the defines to be usable in more modules
moved perl-script to be usable in more modules

Change-Id: If893e4b7e9dc670646bdf097cb6fa5710e45f1ac