Merge 116722 - Sync with impl thread when removing references to external textures
We want to ensure the client side is safe to release textures, so we
sync with the impl thread when:
- we change the texture (and we had one)
- the layer is removed from the tree (and we had a texture)
- the layer is destroyed (and we had a texture)
Reviewed by James Robinson.