hiddenapi: Produce CSV for `list` command

The `hiddenapi` build tool is used for generating a list of all public
and private API. The output is currently two text files, each with
a list of API signatures belonging to the corresponding API set
(public/private). Refactor the code to produce a single CSV file
instead in anticipation of other categories of APIs, namely

Also change class2greylist, which is a consumer of the public API text
file, to parse and filter the CSV file instead.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Test: atest class2greylisttest
Change-Id: I4ac9d96c0d10a87795c6a779f0231269c99959a3
3 files changed