Fix NOT precedence

And reorder Expression2 to ensure pattern expressions are considered
before expressions in parenthesis
Merge pull request #1117 from cleishm/not_fix

Fix NOT precedence
Don't limit types when ensuring idents are defined
Add better errors when deprecated ':' is used in filters