Ousted Pakistani PM re-elected as ruling party head