Fixed togglewall wrapping glitch

Wall adjacency now takes into account wrapping so walls on opposite
sides of the map are properly considered connected.