It's modestly faster, significantly more type-safe, and doesn't assert
when there's too few arguments, which causes problems for plural forms.
Closes#1733.
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
ptr_vector hasn't been updated for C++11, so despite being specifically
designed to store pointers to objects it's less safe and not really any
easier to use than a regular vector of unique_ptrs
iterator_to requires that the object be in the list, which is sometimes
not the case when processing a commit which removed the active line or a
selected line. To handle this, add a checked version that returns
Events.end() when it is not in the list rather than crashing.