Add output parameter support and test.

The concept of "withOutputParameter()" is confusing here. Maybe:

    withOutputParameterReturning("parameterName", &retval);

would be clearer? The confusion is that the pointer passed here has nothing to do with the actual parameter. Rather, it supplies the return value to be passed via the parameter.