Cleanup/error handling/return to standard style

* note that this now errors in cases where there
  would have been a nil return.
Update tests to reflect change in behaviour
add repository_discover generic/character method
don’t error out if we can’t find the repo

* but there was not a more serious error
fix tests for new behaviour
rename repository_discover  function to discover_repository

* better encapsulates the action
* see also http://www.pygit2.org/repository.html