Agreement, struck at COP27 in Egypt, seeks to mitigate climate change’s impact on the river, and create new job opportunities to bolster the economy of both countries