Fix for getEndTime() to report correct Timeline end time.

Previously, the cached mDuration variable could be out of sync
with the actual duration of a Timeline when getEndTime is called.
We now call getDuration(), which calculates the duration if needed.
This ensures the correct end time for the timeline is returned.