Prefer enums over dynamic dispatch.
Created by: ticki
Description: Currently the kernel makes heavy use of dynamic dispatch, even if only a small number of variants exists. Dynamic dispatch can be expensive, especially when each of the allocations only takes a few bytes.
Expected behavior: Prefer enums for KSchemes, Resources, etc., gaining a modest performance improvement.