Frozen container after first service access

A big issue with pimple is that you can instantiate services and then re-
define the factories that produced dependencies of those services, leading
to inconsistent results.

An example:

 * foo depends on baz
 * bar depends on baz

foo and baz are defined, foo is accessed. baz is re-defined, bar is defined.
Although both foo and bar depend on baz, they got a different version of it.

A way to fix this problem is to freeze the container when the first service
is accessed. After the freeze you can still define new services and
parameters, but you cannot override existing ones.

This freezing happens on a per-service basis.

In case you really must re-define a service, you can explicitly unset it,
but that is bad practice and should be avoided.

This is a BC break, as such it targets pimple 2.0.
feature #84 [2.0] Frozen container after first service access (igorw)

This PR was merged into the master branch.

Discussion
----------

[2.0] Frozen container after first service access

A big issue with pimple is that you can instantiate services and then re-
define the factories that produced dependencies of those services, leading
to inconsistent results.

An example:

 * foo depends on baz
 * bar depends on baz

foo and baz are defined, foo is accessed. baz is re-defined, bar is defined.
Although both foo and bar depend on baz, they got a different version of it.

A way to fix this problem is to freeze the container when the first service
is accessed. After the freeze you can still define new services and
parameters, but you cannot override existing ones.

In case you really must re-define a service, you can explicitly unset it,
but that is bad practice and should be avoided.

This is a BC break, as such it targets pimple 2.0.

Commits
-------

c5426eb Frozen container after first service access