Keep better track of resources

[See #1623]
[SeeRM #7692]
Move deletion into #remove_resource

Doing it here means that modules manually calling remove_resource won't
screw up the cleanup
Add a method for dealing with hardcoded URIs
No need to have rescue around a print
Add spec for HttpServer#hardcoded_uripath
Remove inaccurate comment
Dup before modifying

Because `remove_resource` modifies @my_resources, we can't call it while
iterating over the actual @my_resources. The following snippet
illustrates why:

```
>> a = [1,2,3,4]; a.each {|elem| a.delete(elem); puts elem }
1
3
=> [2, 4]
```

[See #2002]
Land #2002, @jlee-r7's patch for better handling uri resources