Refactor ApfNewTest to consolidate program run and check counter logic

Created the verifyProgramRun() function in ApfNewTest to eliminate
duplicate code for running APF programs and verifying counter values.

Test: TH
Change-Id: I1e143457b9eeb335f372f45c5829bc68cdd59401
1 file changed