Fix compiler warning (git_off_t cast to size_t).

Use size_t for page size, instead of long. Check result of sysconf.
Use size_t for page offset so no cast to size_t (second arg to p_mmap).
Use mod instead div/mult pair, so no cast to size_t is necessary.
Flip THREADSAFE's default to ON

Threads are here to stay; and for a while now, users have had to call
the initialization function which sets up threads and crypto regardless
of whether the library was built threadsafe or not.
Merge commit 'refs/pull/2366/head' of github.com:libgit2/libgit2
Merge pull request #2666 from libgit2/cmn/threadsafe-on

Flip THREADSAFE's default to ON
Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf