added andOnCondition and orOnCondition to ActiveQuery

fixes #2957