port PrettyListing class from Homebrew-fork

and simplify it considerably

Staged section is also renamed "Staged content" in the output.