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]
Add functions to normalize Winodws & Unix paths

The purpose of these functions is to be able to join file/dir paths
safely without trailing slashes, basically for the same reason as
normalize_uri.  Some modules are really buggy when merging paths,
so instead of letting them do it, it's better to use these functions.
Update the test description a little better
Drop support for UNC path parsing in normalize_win_path

Not really a good idea to try to parse UNC format. Confuses the
purpose of the function.
Keep the trailing slash if the user wishes
Add another test case
Not Windows format, Unix.
Add another test case for having a trailing slash for unix path

If a trailing path exists in the original input, should keep it.
This test case should verify that.
Land #2146, Unix and Windows path normalization
Land #2002, @jlee-r7's patch for better handling uri resources