Changes to datastore classes reapplied
Further datastore adjustment to changed find_docs_by_view return and json use
Fixed some postgres branch merge deviations