Fix for Jira:https://wso2.org/jira/browse/REGISTRY-2296

Earlier, two email notifications were sent to each LC state update [1].
It was due to making two registry puts. 
Earlier the logic for persisting the old resource was incorrect. It put the resource to the registry only if the new path & old resource path are same. But, it should be other way around. An old resource should be persisted if the new & old paths are different.
Then, finally there is a seperate registry put for new resource path.

[1]https://wso2.org/jira/browse/REGISTRY-2296