Fix memory leak in WSDL parser

Summary: The document tree for the WSDL and referenced XSD-s was not deleted
after parsing.
Closes https://github.com/facebook/hhvm/pull/4045

Reviewed By: @fredemmott

Differential Revision: D1635060
Special-case idx

Summary: `idx` is pretty easy to type, depending on the number of
arguments. Let's do it.

Reviewed By: @elgenie

Differential Revision: D1606308