Core: Mark some functions as const
Merge pull request #7130 from lioncash/const

Core: Mark some functions as const