Fixed some crash-on-theme-removal scenarios

* Make the themesprovider persistent to make sure we don't miss intents
* Use an iterator for resource removal to avoid concurrentaccess errors

Change-Id: I733bfa52e592b3e3039bbdd37f4bf42671dd14b7