Move udf creation/assignment logic into migrator

Explicitly assign UDFs using preferred syntax
Inline function that is only called once

This abstraction might have been useful when writing the module but at
this point it just slows down a loop that can iterate several hundred
thousand times, without greatly improving readability or DRY.
Rename make_contenttype_relics to match others
Add UDF rules for phillytreemap