Added_symbolic_ref function into porcelain module.

This implements `git symbolic-ref` command via Dulwich porcelain.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Python 2.4+ compat

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Properly close pack files on exceptions.

Cherry-picked from max0d41 @ GitHub.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Merge branch 'master' of git://github.com/jelmer/dulwich