Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket).
This class, which does flood filling, is used by the floodFill() macro function and
by the particle analyzer
The Wikipedia at "http://en.wikipedia.org/wiki/Flood_fill" has a good
description of the algorithm used here as well as examples in C and Java.