Make sure that _search/scroll request path does not include index

Unfortunately, my last change (making the _serach/scroll request) relative to base_uri broke the actual
extraction of content. This problem was masked by the fact that response status codes was not checked.

This change introduces return code checking and error reporting, and replaces base_uri (with both the es
base uri and index/type path combined) with two new variables: es_uri and path_prefix
This way the elasticsearch base uri can have a path and the code still support both requests to API endpoints with index/type encoded in the path and API endpoints without.