Twig: faster ->set_atts

If the method gets a single argument we can safely assume this is
something like a HASHREF. This is faster than checking ref() or ->isa
on the first arg.