kernel: symbolic constants for the various kernel errors

I noticed in #1054 when trying to add a new kernel error that it's quite cumbersome because they are referenced by their integer values so you have to change unrelated code in a lot of places. So to fix that I've added constants for them analogous to the already existing ones for special_objects.