Add repository open and discover examples

I slightly expanded the sections on `git_repository_init_ext` and `git_repository_open_ext`, and added new examples on the use cases for `git_repository_open_bare` and `git_repository_discover`, plus a special use of `git_repository_open_ext` with a NULL output to check if a directory is openable without doing the work of opening it.