Former leader Hassan Sheikh Mohamud defeats the incumbent in a vote limited to MPs.