refine modules, extract core module
extract core and app module.
extract auto_free to core module
extract kernel module, depends on core and provides kernel service(no stream)