Pakistan supreme court bars ex-PM Sharif from elected office