Make pairs and ipairs call the appropriate metamethods when present

As is done in Lua 5.2. This makes it possible to use ipairs on the
subtitles object.
Actually define __ipairs on LuaAssFile
Set the maximum end time seen correctly in select-overlaps