Improved handling of already terminated instances

It is possible to create an instance, terminate the instance and then
attempt to recreate the instance with the same parameters. In this case
`ec2.run_instances` returns a reservation list containing the instance ids
but the logic gets stuck waiting for the instance to exist in the call to
`ec2.get_all_instances`, even if wait is no).
Merge pull request #8416 from willthames/ec2_handle_terminated_instances

Improved handling of already terminated instances