Issue #3604341: Inject services into hook class instead of using \Drupal
The Project Update Bot converted the procedural hooks into a RestrictByIpHooks service but left \Drupal::service(), \Drupal::config() and \Drupal::currentUser() calls inside it. Inject config.factory and current_user via the constructor (the service is already autowired) and make the service-using hooks instance methods. help() needs no services, so it stays static.
Closes #3604341