Kylian Mbappe scored twice to help Real Madrid fight support to beat Villarreal 2-1 and move provisionally top of the La Liga.