Fix bug where resources added to the registry weren't flagged as visited

Needed to add hashCode and equals to Resource so that any type of hashing data structor (ie, HashMap) could find added Resources.