Add CMake build system

Downloads and builds ffmpeg 1.1.2 and x264-snapshot-20130217-2245-stable
Breaks compilation as code is not compatible with recent ffmpeg
Fix compilation with recent ffmpeg
daemon: set wget timeouts