Prevent segfault when freeing halo data structures

In op_mpi_exit, halo data structures were freed regardless of whether
they had been allocated or not. Only free those if allocated.