FIX: Performance black hole on sequential  characters

Using many `[` characters in sequence sends markdown-js into a bad performance spiral, eventually pegging a core with CPU usage.

This fix prevents it from happening by counting how many levels of recursion there are in the link tag. We stop if there are more than 2 which is enough to handle all markdown tests, including mdtest in Discourse.