Accusations of ball-tampering and clashes with umpires overshadowed Pakistan's Test win.