Mark Wahlberg took over: In 1997, Paul Thomas Anderson offered Leonardo the role of porn star Dirk Diggler in Boogie Nights