Adding 1D capabilities to distances_pbc.
Adding further 1D functionality.