c2-codecs: fixes memory slot leak

aosp/1691546 resets context without returnning memory slot, causing
it to run out and later decoders cannot get one.

This CL fixes that leak with some refactoring: changed
deleteDecoder to deleteContext and use it instead of
just calling mContext.reset() (this does not return memory slot)

Bug: 186770394
Bug: 186018470

Change-Id: I1c4ee384e8460df506c8179e18507636651cd3d6
2 files changed