docs and test-cases for setting headers/env in functional tests.

Follow up to #9700.
document reqeust simulation methods in functional tests.