Handle RestDatasource errors

refactor:
 * extracted datasetindexer and variableindexer interfaces
 * validation before creating datasets
 * handled indexing errors