Add methods for determining the main module of a distribution.

It's more of a heuristic, since there is no formal definition
of what a "main module" actually is.