Moved includes, some messages only for CLI mode

I switched from putting all includes in the header files to putting only
the needed ones there and the rest in the corresponding code file. This
speeds up building a bit. Then, debug mode will only work when using
this program from the CLI, i.e. not in website mode. And in website mode
don't include thread IDs and filenames in error messages.
Faster Blobs algorithm

Instead of having a single main pass containing numerous partial passes
replacing all the labels of a certain ID, now it'll use two passes: one
to create the labels and mark which are equivalent and another to
replace all labels with a representative of the equivalent labels.

In order to do this I wrote a Disjunct Set (or Union Find) data
structure. It requires its elements to be sortable since it's using
std::set, but we're using it with int anyway. I used std::set since it
has a O(log(n)) find function, and there are a lot of find's going on in
this new algorithm.

Everything was written from scratch, but the ideas were from the
"Sequential algorithm" section of the Connected-Component Labeling
Wikipedia article:
https://en.wikipedia.org/wiki/Connected-component_labeling#Sequential_algorithm

Timing Results:
Removed 13 seconds from test suite of 56 forms, about 0.6 seconds for
freetron_example2.pdf on 8 cores (1.6 if only running on one core), and
basically no change for freetron_example.pdf.