Pakistan reinstates sacked judge