simplify `require` cycle detection and make it handle edge cases where a url loads an eponymous script. To facilitate this, change layout of `require.modules.{.}.loaded_by to contain the module descriptor, rather than the path. Fix ids of top-level scripts as they appear in require.modules.