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.
yeah, i know it's our code, but the same issue applies here. and it doesn't work on win32 (shell_exec_error halts script execution if the command fails)

can you fix it, while you're at it?