Testing for unit roots in panels with structural changes, spatial and temporal dependence when the time dimension is finite