tests/rules: Reduce code duplication
Reduce the code duplication and boilerplate to create and destroy the test clients by making the related variables class members.
Handle special cases using an extensible flag mechanism.
Renaming variables to m_...
is split into a second commit to make the code review and diffs easier to parse
Edited by Ismael Asensio