Planck early results. XXIV. Dust in the diffuse interstellar medium and the Galactic halo