Added locking for FilteringPipeline and ImageFilterRS. Gets rid of leaked threads.
Bug:
8373600
Bug:
8363001
Bug:
8344345
Bug:
8264659
This CL fixes several things:
- FilteringPipeline no longer leaks a handler thread every time photoeditor is reopened.
- ImageFilterRS no longer leaks an RS context and thread every time photoeditor is reopened.
- ImageFilterRS now uses locking.
- ImageFilterRS no longer leaks Bitmap references or static renderscript allocations.
Change-Id: I79ebde1a8ba8ad689791c2af8db0c3c907e06399