lua : add a pure lua implementation of "require"

this allows to call coroutine.yield() from within a required
script.

this is alimitation of lua. fix bug 10246

(cherry picked from commit 6285f136ee2326d9a414610e5b4b562808f51107)