(bug 35315) Detect circular references in strip tags
Explicitly detect circular references in strip tags and break the loop,
similar to how we deal with circular references in templates. This is
necessary to support Scribunto since we imagine we will provide an API
that allows strip markers to be forged.
The recursion depth limit is a consequence of changing the algorithm
from iterative to recursive, it's required to protect the stack against
deeply nested #tag invocations.
Change-Id: Icc8dc4aedbced55ad75b3b5a5429a376d06d9b31