Add infinite-loop detection to bh
Stx.parse invokes customized parser that does not expand applyNext,
apply, applyCtx. Classifier still invokes bemhtml-compat parser.
Custom parser: don't expand apply, applyNext, applyCtx. Custom Jail is
also applyNext aware. Serialize applyNext into (applyBase(), ctx.json())
expression which falls into inifinite loop during matching.
this.extend() into ctx.extend()