add rewrite rules and improved efficiency of some routines in GenUtil
add rewrite rules and improved efficiency of some routines in GenUtil

darcs-hash:b0a2f6c8a0f79501790c0711715e15b0cf907ad3

dpwright/jhc,dpwright/jhc,dpwright/jhc,dpwright/jhc