Fix clear() operation for rsScriptC.

- This removes a memory leak where some elements were not getting tracked
  properly (and then triggering an assert when a context is destroyed).
- Convert ScriptCState to use a tracked object reference for mScript.
- Add a missing clear to FontState.
- Clean up synchronization in RSTest so that our graphics context outlives
  any subtest context.

Change-Id: I0d5768c4d2f8810dd1ae2f68b1edd7e150f382fd
10 files changed