kernel: Make some functions const
kernel: Shorten GetCount
Merge pull request #248 from lioncash/kernel

Misc minor kernel-related changes.