bemhtml: move most used vars to the scope

Backport (or forward-port?) of:

https://github.com/bem/bem-bl/commit/b7c74fdd1d9c87f4c84f22425ef926b7989c5b0d
Merge pull request #17 from indutny/feature/fast-matches

bemhtml: move most used vars to the scope