For JGit impl to be viable, it needs to implement IGitAPI.

For example, BuildChooser in the Git plugin uses IGitAPI in its signature, so we need to support that in JGit.
To do this, moving IGitAPI implementation up the inheritance chain to share it between CGit and JGit.
added the merge-base computation and reusing Repository object