Mark some functions as const
Merge pull request #7147 from lioncash/moarconst

Mark some functions as const