ffi: style changes

Make to_str() accept None as well as ffi.NULL to return as a negative
value, and grab the version in a more compatible way.
Optionally skip online tests

It sometimes happens that one finds oneself on a train. Exporting the
PYGIT2_OFFLINE environment variables disables the tests that need a
working network connection for such cases.
Remote: protect against invalid input on raname

The C API expects a non-NULL new name and raises an assertion if we
don't protect against such input, so let's guard against falsy values,
which also takes care of the empty string, which is also not valid
input.