Make registry and event optional
Make registry and event optional

This will make using ServiceContainer in our tests much easier so that
we can take advantage of EventMockTestCase.

lyudmildrx/lymph,itakouna/lymph,kstrempel/lymph,mamachanko/lymph,deliveryhero/lymph,mamachanko/lymph,vpikulik/lymph,mouadino/lymph,alazaro/lymph,Drahflow/lymph,torte/lymph,mouadino/lymph,mamachanko/lymph,lyudmildrx/lymph,itakouna/lymph,dushyant88/lymph,itakouna/lymph,mouadino/lymph,alazaro/lymph,lyudmildrx/lymph,alazaro/lymph