Severe bug fix in neighbor listing

Fixed multiple neighbor entries for edge atoms in partially periodic
systems.