Regex dispatcher for `resource`

We might want to break up the resource function which converts URI's into data objects of some form or another.  We can't use our normal dispatching tricks here because we can't dispatch on type.  

Instead lets dispatch on regular expressions
```Python
    >>> f = RegexDispatcher('f')

    >>> f.register('\d*')
    ... def parse_int(s):
    ...     return int(s)

    >>> f.register('\d*\.\d*')
    ... def parse_float(s):
    ...     return float(s)

    Set priorities to break ties between multiple matches.
    Default priority is set to 10

    >>> f.register('\w*', priority=9)
    ... def parse_str(s):
    ...     return s

    >>> f('123')
    123

    >>> f('123.456')
    123.456
```

cc @talumbau 
So, this is a case where a higher value of the variable `priority` means we choose that one, yes? This always messes with my brain when discussing things like heaps and whatnot, since often a lower value for a variable like `priority` would mean that it actually has a higher priority. My thought would be to call the variable `precedence` but perhaps my view is backwards.