A deal to develop a new railway project has finally been signed between the UAE and Oman after years of delay.