Fix topgit

looks like magit-topgit.el has bitrotten a bit

Since I'm in a position to use it once again, I intend to fix it.
This series fixes a couple of blocker issues making the extension basically unusable as it is.
I didn't test "advanced" features yet, there might be need for more work there.