New Handle manager

This implements a new Handle manager, adds ref-counting to kernel objects and implements `DuplicateHandle`. Note that support for `DuplicateHandle` is still fragile, because the rest of the kernel doesn't expects object to be able to have multiple handles pointing to them. Regardless, it seems to work OK on what I tested so far. I plan to fix this next, but decided it would be good to submit PRs more often to reduce rebase pain and reduce review sizes.
After this PR, I want to move things to keep references using intrusive ref-counted pointers, but right now the kernel keeps track of resources purely based on amount of handles, so it's not well equipped to deal with this change yet. It's in the road-map though.