Documents show Sir Keir Starmer was warned the peer's relationship with Jeffrey Epstein posed a "reputational risk".