The EU Council and the European Parliament have reached a provisional agreement on new rules aimed at modernising the coordination of social security systems in the EU.