Make resource case insensitive

All resource URIs are checked against the collection of regular expressions
in a case insensitive way.

This simplifies the creation of `resource` functions
(e.g. can say '.*\.csv' rather than '.*\.(csv|CSV)') but limits
discrimination power a bit.