Gaia Data Release 2: Rotational modulation in late-type dwarfs