Bug 446593 - Fix ClassCastException when opening tag list for jgit

Git tags can also point to other objects than commits, e.g. a blob.
Hence we first need to check the type before casting to RevCommit.

Change-Id: I78d008bfbdaae95f0c753e4974643b2bfa4f1a9a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>