Add type accessors to Dependencies
info: improve dependency listing
deps: fix --1 output

Fixes #17550.
info: simplify keg listing
Initial tests for dependency expansion