As Saudi Arabia tries to wean its economy off oil, it is vying with the UAE for foreign capital and talent.