WFLY-2494 @EJB not injected in JAX-RS Resource (unless CDI is enabled)

- Move unreachable code to reachable location
- Only attach INJECTION_TARGET_DEFINING_ANNOTATIONS to root deployment unit