includes/bbcode.php:check if bbcode tag exists before executing regexes

Changes mostly done in bbcode.php. But it seems like it doesn't help much in the case that slowed down the matrix recently. I assume the problem was, that in that thread hundreds of urls were converted into html links. May be we should limit that somehow? (e.g. if there are more than 10 urls in an item, don't convert anything)