feat(REST): expose HistoricTaskInstanceQuery via REST Api

related to CAM-1875
fix(engine/task): use proper field to order by activityInstanceId

related to CAM-1875