module: normalize path when computing cache key.

When adding a new module to the cache, and also when querying the cache,
normalize the path so that modules don't get loaded more than once when
they are referenced by the same filename but with different case.

Fixes #7031.