Planck intermediate results: XLVIII. Disentangling Galactic dust emission and cosmic infrared background anisotropies