Replace non-test usages of \Drupal::state() with IoC injection