cubicweb #2517748 access to Hook.__registries__ may trigger exception [done]

as it's checking .events attribute. This should be done at registration time instead

prioritynormal
typebug
done in3.15.6
load0.100
load left0.000
closed by#22af622e6e24 [hook] fix hook base class so access to __registries__ doesn't call check_event, only call it in registered callback. Closes #2517748