[omxcodec] Add shared pointer to delay shutdown of codec until buffers are returned