On the formation of the Kepler-10 planetary system