Pakistan’s Supreme Court, stacked with judges friendly to President Pervez Musharraf, on Thursday threw out a final challenge to his re-election and paved the way for him to quit…