[refactor] inline Module_js.imported_modules into its only caller
[refactor] inline Module_js.imported_modules into its only caller

Summary: this function is private and only has one caller. both the caller and the implementation are simpler if they're combined, and helps in a follow up diff.

Reviewed By: panagosg7

Differential Revision: D23499866

fbshipit-source-id: d74bac4db157a6bdc08c8ea1a0d40c2fea3c967f

mroch/flow,facebook/flow,facebook/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,facebook/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow