Translate import declarations into calls to require() in beforeInit.

Import hrefs are assumed to be relative to the current file, and so
the call to require has `./` prepended. e.g.

    <link rel="ractive" href="test.ract" />
    require('./test.ract');

If a beforeInit callback was specified in the component, it will be
called after the sub-components have been set into options. See the
new test case for an example.

Also, I refactored things slightly to branching on `if (component.script)`. This causes `var component = module` to always be output, and the use of `component.exports` over just `exports`. Please let me know if that's a problem.
I'm not familiar with how beforeInit works, is it possible for options.components to already exist at this point?