codecs: check for nullptr in vpx

When init failed, we should delete invalid
ctx and check for that during each call.

This is a work around of the bug where
the framework does not respect the max
instances.

The CTS test keeps creating 32 instances
and deletes them; and during the delete,
decoder could crash, especially on x86.

Change-Id: I6a4502b794bad0800a328b3f590736fedcfe647b
2 files changed