Simplify code and add tests

* Remove shell command injection vulnerability.
* Make sure that the Python script doesn't allow users to download arbitrary URLs.
* Set proper HTTP headers to avoid content being parsed as HTML, this could lead to a XSS vulnerability.
* Remove "type" parameter from the php script, HTTP semantics are sufficient and easier to use here.
* Remove "vid" parameter, it is not needed.
* Make sure to properly check whether the Python script failed, and separate stdout and stderr.
* Properly handle invalid invocation of the Python script, and display an appropriate error message.
* Remove unnecessary YoutubeInfoExtractor class.
* Make sure youtube-dl error messages show up.
* Add some basic automated tests.