[engine][module] Implement require() as per Node.js modules

Still lacks support for package.json (.node_modules), JSON files and
index.js.