Consolidate the duplicate code for extension api tests.
This will be also used by servicevm extensions later.
At the same time, a bug in test_extension_firewall.py is also fixed.
double call of super().setUp().
Closes-bug: #1275654
Change-Id: I72f185ef6e5af55729ced51fc0b72fae799d46ac