indexserver: move sourcegraph api functions into own struct (#125)
This PR is refactoring the interactions with the Sourcegraph API into its own
struct. The intention is to add a mode to indexserver based on the local
filesystem rather than just the Sourcegraph API. The benefit of that is it
avoids needing to run the whole Sourcegraph environment to test manually test
indexserver. This is so we can have a shorter feedback loop when making
changes to indexserver -> move towards integration tests.