Fetch failed transactions from cache when possible

Don't bother submitting transactions that failed during consensus.
This allows to retrieve proper return code in cases transactions could be applied to the open ledger but failed at consensus time
Merge pull request #174 from MonsieurNicolas/short_circuit_known_bad

Fetch failed transactions from cache when possible