Rewrite xlat_getvp to take tmpls, and allow state attributes to be references in xlats

Because *someone* forgot to add the state list to xlat_getvp. What was that about too much abstraction?
don't escape attribute values if we were passed an escape function