RESTEASY-1009 Add a null check for ServletContext when using the CdiInje...

Added a null check for servlet context, in the case of Netty (and probably other embedded containers).