Add require.paths support

Issues: https://github.com/n1k0/casperjs/issues/462 https://github.com/ariya/phantomjs/issues/11339
Getting ready for 1.9.2.

Issue #11452: https://github.com/ariya/phantomjs/issues/11452