Improved git prompt

Use `git status -z --branch --porcelain` to retrieve branch status
information in a more easy-to-parse way.  Simplify parsing.