[droid;mediacodec] Bunch of Mediacodec fixes

Backlog of Mediacodec fixes from SPMC