Perfprofd: Factor out the command-line-based loop

Move cmdline-related code out of the core.

(cherry picked from commit 04672dd13fd46a5f07f553ad7623f21277ef8bf2)

Bug: 73175642
Test: mmma system/extras/perfprofd
Test: perfprofd_test
Merged-In: Iae2a74f82ed103891149a8f21f8db509c8f53b65
Change-Id: Iae2a74f82ed103891149a8f21f8db509c8f53b65
7 files changed