Make test parameters context managers

Allows adding test parameters that use resources requiring cleanup.  For
example, a test parameter for file upload will need to open the file for
the duration of the HTTP request and make sure it is closed after the request.