Fix JS modules to only include exported items

For #239.

Also all exports are elaborated during renaming now, and there's a representation of instances in the exports list. It's not doing much yet, but it may be helpful in improving the behaviour of how instances propagate.

We might be able to tidy up some of that docgen/psci code relating to export filtering now too?