Introduce ExecutionState concept so that we can retry after failure.

Add test to ensure that the SOR won't continue to rely on a Market after 3 failures.
Fix fat-finger made before the previous commit