build: fix `python_finder`: prefer python2, look for/prefer .so

This fixes building YCM / ycmd for pyenv with python3 and python2
activated/configured.
It seems you want to use `command_exists`, which is declared in this file.