Refactored instance resolution in puppet classifier

Reimplemented instance resolution to find the first instance that
matches by IP address instead of trying to normalize the hostname.