Port MediaFile from C++, add some Annotation utility templates