.gitignore vim swap files and ctags

Signed-off-by: Gregory M. Turner <gmt@be-evil.net>
Fix active_branch

The prior implementation of active_branch was incorrect (assuming
that, by "active_branch," intention was to provide the caller with
the thing with a '*' next to it in the output of "git branch".

For example, if two branches pointed to the same id, the prior
implementation would always return the same value, regardless of
which was, in fact, active, according to the porcelain.  Worse, an
active branch would be returned (again the same one) in a detached
head state, so long as the detached head happened to be the id of
one or more branches in the repository.

The active branch in git is, as far as I'm aware, something like:

  if HEAD is a symbolic ref to a branch, that branch
  otherwise, no branch is active.

So, that's what I've tried to put in it's place.  Not sure my
implementation is entirely "correct" but I'm confident it's less
incorrect :)

Also, since the head function of dulwich returns an SHA, I am
reasonably sure that the active_sha property is equivalent to
the head property.

If so, it should probably be dropped (as its presence suggests
that the two properties do something different).  Taking this
belief to be correct as a given, I've clarified it by replacing
the old implementation with a new one: "return head", documented
that the API is deprecated, and noted why.

Those are the only two consumers of _active_branch, hence, I've
eliminated it.

Signed-off-by: Gregory M. Turner <gmt@be-evil.net>