Small cleanup in examples.

I've added credentials callback to `ls-remote` and `fetch` examples so they match clone behavior. While on that, I removed some code duplication in ls-remote, to match solution form `fetch`. Finally I added some rules to `CMakeLists.txt` to build all the examples, not only some of them.

Those are small changes so I made them in one batch. If you prefer multiple PRs, let me know.