Use a list instead of a vec in connected-cells

Based on a patch from Zach Allaun.
Small refactorings in locate-cell

Again, based on changes from Zach Allaun.