Supercongruences of Atkin and Swinnerton-Dyer type for Legendre polynomials