Private equity firms are buying slices of each other's best companies as exits have become harder to find.