Move require()/define() to modules.js file

This file is loaded in <head>. This way we can use require() and
define() in mf-application.js too.

Change-Id: I8353034de363344242bdb5b551672af004de5415