Zms/ffmpeg

I was messing with zms video streaming to see how it might improve watching monitors over the internet. It didn't really work at all for me. So i started messing with the code and this is what i wound up with.

Then i noticed that there might already be some rewriting of the code (https://www.bountysource.com/issues/935809-store-events-in-a-video-format-855). Not that this is a try to implement video-storage, but i got the feeling that FFmpeg code was being rewritten, and that my own changes might be too much to be able to merge with master code (for my own purposes if nothing else).

So this request is mostly to about asking if there would be an interest of accepting changes like these, or if other changes are already being done that would address the issues i was experiencing? (that is, streaming not working)

Ignore commits from Mar 21 -> Mar 23. Sorry about getting those there, but i need those so i can stream my cameras :) they're unstable.

See commit message "Support streaming with zms (using ffmpeg) better" for details.
I've also made ZM compile with FFmpeg 0.5..master.