cosmetic use of when
don't let magit-checkout return nil

This makes a difference when it is used in an extension hook.
magit-git-section has been retired

Use magit-cmd-insert-section instead.
honor function rename

magit-topgit-remove has been renamed to magit-topgit-discard.
Merge pull request #1206 from sigma/fix-topgit

Fix topgit