gitcmds: show the correct diff output for merges and root commits

"git diff $sha1^!" works for normal commits, but it fails to show a
useful diff for merges and the root commit.

"git diff $sha1~ $sha1" properly handles merge commits, but it fails on
the root commit because "$sha1~" is not defined (does not exist) for the
root commit.

"git show $sha1" properly handles the root commit.

Fix the diff display for merges in git-dag and git-xbase by explicitly
comparing against the first parent in gitcmds.sha1_diff().

Use "git diff $sha1~ $sha1" for the common case and fallback to using
"git show $sha1" when that fails to handle the root commit.

Signed-off-by: David Aguilar <davvid@gmail.com>