Add caching mechanism to speed up midi file reading speed.

This cache mechanism reduces the number of DataSource reads and
binder round trips to the IDataSource. For midi files smaller
than 1.5M, the pre-read data mechanism will be enabled.
Its purpose is to reduce the time spent on filetype sniffing.

Bug:164977553

Change-Id: I1db7c739a69f4324cc339b8521b5a6998e8a8df0
Merged-In: I1db7c739a69f4324cc339b8521b5a6998e8a8df0
2 files changed