Feature/verify repository

branched off https://github.com/elasticsearch/elasticsearch-net/pull/1097 so that will need reviewing first.

implements #1084