Refactor CDI contexts to use custom Contextuals where possible (#12454)

Change-Id: I3758ea0762e5cb40ccd824c15974cde0312d2ad0