[testArmBase] Add tests for self-monitoring triggers

And move some generic functions from testDBTablesMonitoring to
Helper.{cc,h}.