LPS-47102 Move dependency.js to module

Hey @jonmak08,

Here is an update for https://issues.liferay.com/browse/LPS-47102.

I separated Nate's commit https://github.com/natecavanaugh/liferay-portal/commit/2c586a24a1b83f7957ac6de318b573a84a41d27d into 5 pulls.

The other 4 are:
https://github.com/jonmak08/liferay-portal/pull/892
https://github.com/jonmak08/liferay-portal/pull/893
https://github.com/jonmak08/liferay-portal/pull/894
https://github.com/jonmak08/liferay-portal/pull/895

Please let me know if there's any issue. Thanks!