Add uuid_resource to ResourceState.

Allows to get the uuid without having to to load it.
Before, even though the UuidResource has been saved or loaded
and so it's already in the cache. Finding it from a Resource required
a load by criteria returning the id. From the  id we could then go to
UuidResource in the cache.
Merge pull request #197 from maxigit/57980394_speed_up_uuid_creation

57980394 speed up uuid creation