Portugal, Spain and the European Commission (EC) have agreed a plan for the development of a high-speed line between Lisbon and Madrid.