Create functions to permenant functions for preg_replace_callbacks

I converted all (well there is one in a template I did not, and may have missed some of course) create functions that were done in preg_replace_callbacks to be permanent functions.  

The create function is fine, but in the event a preg_replace_callback with one gets called in a loop or recursively it will eat up some level of memory  nom nom nom .... 

Most of these help very little in some quick testing, others do help a bit more.  This is in response to the OOM issues reported.