`magit-guess-branch': use new func `magit-get-previous-branch'

Instead of depending on git-log(1)'s "--grep-reflog" flag (which
was only added in Git v1.8.0 [1]) and potentially doing a whole
bunch of string matching, use git-rev-parse(1) with the @{-N}
construct, which is supported since Git v1.6.2 [2].

As an added benefit, we now return nil instead of an invalid
refname when the previously checked out branch no longer exists.

[1] git/git@72fd13f7
[2] git/git@d18ba221

Signed-off-by: Pieter Praet <pieter@praet.org>