Find EC2 instances by public or private IP address

Before this commit ec2 instances where only searched by private IP
address. Now instances are searched using the following logic:

Using the IP address in SSH_CLIENT environment variable

 * Search for an instance filtering on private IP address
 * If no private IP match, then search filtering on public IP address