feat: add support for the 'main' attribute from package.json

Here is a set of more radical changes to the plugin in order to support the `main` attribute from the package.json. This is one of the last changes leading to the more-or-less complete support of node's loading algorithm for modules.

Fixes #16