Hackers on a mission from the Iranian government hacked into the back office systems of a New York dam and were cyber-probing American financial institutions roughly two years ago—just as the Iranian government was negotiating a nuclear deal with the…