[errdb] Add errdb.pl script to build error database