Fix type for new_id in events
Add destructor to resources
Remove some unneeded cruft from resource.c
Add a getId method to Resource
Add a hashCode method to Resource