修复若干bug,实现core::app()->session/cookie