Refactored containsAdvancedLuceneSyntax() for clarity and reusability of checks.
Expanded corresponding test suite.