Allow arbitrary external ids

Right now, ids used to reference modules in external bundles are
required to correspond to actual files, but it'd be helpful if these ids
could be arbitrary. This issue has been brought up in #387 and #472.

A small change to how external modules are loaded, combined with using
the mdeps filter option, allows for arbitrary external ids. This commit
includes test coverage.