Make cohort creation for across trial db-agnostic
Merge remote-tracking branch 'origin/london_hackaton' into pre-release-v1.2