WFLY-2743 Fix up some other static references to the ServiceContainer

Also make sure that code access it in a privilidged block if appropriate
Merge pull request #5709 from stuartwdouglas/WFLY-2743

WFLY-2743 Fix up some other static references to the ServiceContainer