Implements the #has Block helper

closes #2115
- Added new #has block helper that parses logical tag expressions
- Added several tests for #has helper

kudos to @s0x for some crazy JS-fu