Fix lots of use-after-frees

Summary: asTypedValue was returning a pointer to a temporary Variant, cast
to a TypedValue*.

Reviewed By: @edwinsmith

Differential Revision: D1728889