Change the XMLSerializer.read_inventory_from_string api.
This allows us to pass in the entry cache, rather than using a global. This gives a lifetime to the cache, and eliminates some of the concerns about expecting a different IE from different serializers, etc.
The cache is also cleared when the repo is unlocked.