MediaCas: fixes for playback tests

- Set crypto mode to kMode_AES_CTR, since kMode_AES_CBC is not defined
  on Java API, and is rejected when the sample is queued to MediaCodec.

- Wrap the plugin object in a RefBase, and hold a strong ref to it
  when executing any API calls in CasImpl. This is needed because
  CasImpl could be released by Java API, while MediaCodec native is
  still trying to access it.

- Fix build warnings.

Tests: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.ClearKeySystemTest

It should not fail.

bug: 22804304
Change-Id: Id4ef037d57dd741d2bb22b1de3d04c8d078b69fb
diff --git a/include/media/CasImpl.h b/include/media/CasImpl.h
index 80c901e..3c07092 100644
--- a/include/media/CasImpl.h
+++ b/include/media/CasImpl.h
@@ -84,8 +84,9 @@
     virtual Status release() override;
 
 private:
+    struct PluginHolder;
     sp<SharedLibrary> mLibrary;
-    CasPlugin *mPlugin;
+    sp<PluginHolder> mPluginHolder;
     sp<ICasListener> mListener;
 
     DISALLOW_EVIL_CONSTRUCTORS(CasImpl);