Diffraction and microscopy with attosecond electron pulse trains