insights: when parsing query check for pattern type override in query
Created by: chwarwick
Adds an additional check in ParseQuery function to use the pattern type specified in the query if present. Also exposes a function to get the patternType either from the submitted version or the override.
Test plan
Unit tests added and pass