* Make flood filling logic iterative (vs recursive)
I basically tried one-to-one conversions here to avoid mistakes.
probably it has a room for later optimizations.
* Use explicit malloc (vs variables on stack) to allocate the work area.
* Estimate the amount of memory for the work area dynamically
from the image size, instead of using a constant FLOOD_FILL_MAX_DEPTH,
which is too big in the most cases.
Fix#2, this patch makes large images support a compile time option by
allowing QUIRC_MAX_REGIONS to be tuned via CFLAGS up to 65534 (current
default is 254).