various whitespace and indentation changes
update NEWS
update TODO notes
more file closing cleanup
use more efficient method to check PIPESTATUS for errors

Substring substitution is 2-3x faster than looping over the values.
minor spelling fix: existant -> existent
add get_profiles subcommand for pinspect query

Lists profiles related to a given repo, for example,
`pinspect query get_profiles gentoo` would return all the
profiles for the main portage repo.
merge master repo categories with slave repos

This is the correct behavior according to the spec.