UN director in Gaza quits for new post