Use libgit2 to get branch list

Signed-off-by: Sven Strickroth <email@cs-ware.de>