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.
This and the 0x8000 max generation are based on the CTR-OS kernel limits, discovered through experimentation and later RE. 4096 is the maximum limit of handles per-process, but that limit can be lowered depending on the exheader settings. (Which I don't emulate now, maybe look into it much later.)