Revert "Remove the 'Type Constructor' hack. Inferred value of apply is always hole"

This reverts commit 0cdb589b8c7e409b2ebfc55621ba31ee0804db8d.
Rename test variables to match auto-canonized ones from test logs
Extract makeTypeRef cases into functions