!hco #15635 reorganize registration of predefined, custom HTTP primitives + other small improvements

Fixes #15635.

@richdougherty can you check if that would work for you?
Is this another place where you could remove `@volatile` and `synchronized`?