Replace autoconf with ctypes

HAVE_funcname for functions and USE_libname for
libraries.
Test libav on Travis

Really untested.
apt-get update
Manually look for libs on Linux

Also, replace check_output for 2.6.