contrib/subtree: Teach add to store repository & branch in .gittrees

The repository and branch of a subtree added with the add command is
stored in the .gittrees file.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>