urls: fixed incompatibility with Python 3.5
urls: fixed incompatibility with Python 3.5

In python 3.5, constants in re.sre_parse are not longer strings but have
special type `_NamedIntConstant`. They can be converted to string using
`str(x)`, but that string is uppercase instead of 3.4's lowercase.
So I converted them to lowercase when it comes to module names, and
replaced any direct references (in comparsions) with constant references.
It should also give us a tiny performance boost on Python 3.5,
as we will now compare integers rather than strings.

PS. Hope that I found&replaced all direct references..

klen/muffin,drgarcia1986/muffin