Palestinian doctor who worked in Gaza elected Glasgow University rector