mp3dec: Fix out of bound read error

Add check for required number of bytes before stream read
while reading side info.
Modify bitstream read functions to only read required number of bytes

Bug: 154075955
Bug: 154076193
Test: POC in bug description
Test: atest android.mediav2.cts.CodecDecoderTest
Test: atest Mp3DecoderTest -- --enable-module-dynamic-download=true

Change-Id: I777f22d21cbf026056f1ac69de4bb763846b1a9d
(cherry picked from commit c57092d196049acacd85623365b99e45ccc61b86)
4 files changed