Use the symfony DIC interface to make code more compatible.

In order to make code more compatible with D8 core, it is helpful to have the symfony container interface available.
With that you don't have to subclass generic factories, like done on the KV test PR.
Follow-up: I think we should fix those cases and return NULL when the result would be FALSE.

Having this tests check for FALSE when giving NULL_ON_INVALID_REFERENCE is a fail.