lib: remove variables root and GLOBAL

There is no document and API use the root and GLOBAL variables. I think we can remove it from core.