Move mod calculations to a separate helper

We use mod calculations on multiple places, so make a separate helper
from it with proper types.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Add a travis.yml to test a build.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Use new fancy build on both linux and osx thing.
Move to track libgit2 git

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Test new way to run travis builds

Signed-off-by: Anton Lundin <glance@acc.umu.se>