Update JGit dependency from 1.3.0 to 3.1.0 and refactor public API

This PR updates the JGit dependency to 3.1.0 and cleans up the use of Exceptions in the public API.