The enforce connectivity step of slic runs a BFS and puts the
results in coord_list. This coord_list has room for max_size elements,
which is easily overrun if there is a large connected element. This
change limits the BFS to max_size, so that if a connected area is bigger
than max_size, it will be split up instead of the program crashing.