Add android::base::GetPids() function to return all pids

We loop over /proc to iterate through pids in a lot of code, so let's
consolidate this into a single function in libbase.

Test: new unit test
Change-Id: I908fab90b603546d0e3e8b8acdc8dadfc3552d62
4 files changed