fixes for reading in CSV and JSON data sources

including escaping xml characters, handling JSON data array as top
level response, JSON integration with cacher, fixing header row in CSV
data