Loop detection now 4096 levels deep. Use char instead of bool so we can do memcpm instead of iterating over each vector member.

Updated scanning code to handle rob and bgr format. Also updated
scanning code to scan regions.  Now we can decide what to scan in each
region.  Currently scanning 4 points.  Seems to work ok for all but the
smiley face tiles.