See the patch for description how this works. It may need some tidy ups but I consider it committable in terms of how it works.
mutex is used for simplicity until this is proven to work out. I don't expect it to be a problem in the foreseeable future (modulo some microbenchmarks perhaps).
In contrast to D22811 this automatically takes care of all crhold/crfree consumers (in particular meaning both file and vm object). I verified with open1 and brk1 microbenchmarks that cred-related bouncing is eliminated. open1 is now gated on openfiles updates and brk1 on swap_reserve_by_cred, both of which should be solvable with something in the lines of sloppy counting.