Optimise case arguments in sys_core_fold

If the argument of a case expression is a let, a seq or a case with two clauses
where the second one is a failing clause; it can be moved outside the case and
further optimisations can be performed.

	case let <Ssa> = {'ssa',_cor14,Sub0,_cor15,_cor16}
	     in let <_rec11> = call 'erlang':'+' (_cor14, 1)
	        in let <_cor4> = call 'erlang':'setelement' (2, Ssa, _rec11)
	           in {{'tmp',_cor14},_cor4} of
	    <{NewReg,Ssa}> when 'true' ->
	        ...

	=>

	let <Ssa> = {'ssa',_cor14,Sub0,_cor15,_cor16}
	in let <_rec11> = call 'erlang':'+' (_cor14, 1)
	   in let <_cor4> = call 'erlang':'setelement' (2, Ssa, _rec11)
	      in case {{'tmp',_cor14},_cor4} of
	             <{NewReg,Ssa}> when 'true' ->
	                 ...