Cam 1725

Implementation of extended query functions for HistoricProcessInstanceQuery
JIRA: CAM-1725