make terralib.require behave more like require
-- search package.loaded
-- returns only 1 result
-- record package.loaded[name] = true if it returns null
-- if pcakge.loaded was written by loader, don't rewrite.