FFmpeg support for WebM uploads

A bunch of users on a board I frequent were reporting crashes in threads with a lot of WebMs, and it seems like the single frame WebM thumbnails were to blame. This is probably the easiest way to make the problem go away and I think @czaks mentioned he was considering implementing something like this himself at one point too, so I think this is worth merging.

I also threw in support for BSD md5 since my dev box runs OS X and didn't have md5sum installed. I think its a better solution than installing the whole GNU coreutils package when you don't need it.
Just re-read what your comment and double checked to see if $filenames needed escaping. Looks like its already escaped a few lines up so we're fine.

Not sure what do to about shell_exec_error halting the script on win32 though. I don't have anything running Windows here.