libstagefright: Fix to free buffers in error scenarios

MediaBuffer objects are not freed if component transition from
IDLE->EXECUTING or EXECUTING->LOADED fails (or if the
OMX_CmdComplete messages are dropped due to an earlier error)
Additionally with native buffers, the corresponding
ANativeWindowBuffers are not cancelled back in the above scenarios.

Change-Id: Idad02f7bb6bbfcd30947624148ea996a4a8f18b3