add support for closing stuff to MethodContext.

Anything that has a close() callable can go in.