From surveillance to expert witness testimony, here’s how PIs work with lawyers and clients in legal disputes.