add getMatchingFramerateIndex

returns the index of the closest matching framerate from an array of
framerates