Use checked arithmetic in time_to_us.
Use checked arithmetic in time_to_us.

Rename time_to_ms helper functions to time_to_us to clarify they
return times in microseconds.

Since movie and track durations and media times can be 64-bit
integers, converting them to microseconds can overflow. Fortunately
our runtime error checking caught an instance of this.

Change the return type of the conversion routines to an Option and
use checked artimetic, returning None on overflow or divide-by-zero.

In addition, split the calculation into whole and remainder fractions
to maintain precision for larger inputs. This is based on a strategy
used by Chrome's mp4/track_run_iterator.cc.

If we wanted to be more aggressive we could reduce the fraction,
for example with num_rational. Common media rates have a gcd with
our multiplying factor of a million between 100 and 10000.

In get_track_info, check for  None and return an error when
the conversion to microseconds cannot be completed.

Also add some tests to verify the overflow bounds are what we want.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1301065

mozilla/mp4parse-rust,kinetiknz/mp4parse-rust,kinetiknz/mp4parse-rust