The guild hall will be transfered. Guild halls technically speaking don't belong to any one player, but the guild itself. However each guild hall needs one person who is able to invite, place store items, etc, and therefore it goes to the leader. If the leader steps down and a new leader takes their place, they will be the owner of the guild hall, regardless of whether the previous leader remains in the guild or not.
Like wise, if for whatever reason the guild disbands, the guild hall will be lost at server save, and this can not be prevented.