Move `Kernel.local_variables` to core.
Merge pull request #2296 from take-cheeze/core_local_vars

Move `Kernel.local_variables` to core.