When Alexander bombed in 2004, it seemed like a disaster. But somehow, the Jared Leto-led epic still became one of his highest-grossing films. Here’s how a failure turned into financial success.