Pakistan court bans ex-PM Sharif from elections for life