MediaCodec: implement detach surface

Reuse the already existing ReleaseSurface as it is equivalent to
what a detached surface is. Also consolidate setSurface routines
into a common handleSetSurface to simplify future maintenance.

Bug: 325550522
Change-Id: I867cdc45e7db9e9bafda489d1071e33e3258088c
3 files changed