Use fixtures to restore the API version changes of os.environ
in each functional tests, aims to avoid the following test cases
failing in unexpected context.
And make sure setUpClass/tearDownClass call super class's
corresponding methods first.
Change-Id: Ie248fe9d3a9e25f1b076c9f2c363200f29a83817
Closes-Bug: #1696080