smart-parse: support nestled queries
smart-parse: support nestled queries

This now supports nestled parentheses for putting together more complex
queries.

Also did slight refactorization.

Part of #531.

ettrig/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,garberg/NIPAP,garberg/NIPAP,SoundGoof/NIPAP,ettrig/NIPAP,SpriteLink/NIPAP,ettrig/NIPAP,bbaja42/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,ettrig/NIPAP,fredsod/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,garberg/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,ettrig/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,garberg/NIPAP,SoundGoof/NIPAP,garberg/NIPAP,bbaja42/NIPAP,fredsod/NIPAP,ettrig/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,garberg/NIPAP