- Renamed Events() to RegisterEventHandler() in Engine.
- Added RegisterEventHandler() to the Cluster interface.
- Removed EventHandler requirement from swarm's Cluster constructor.
- Make API's events handler private.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Engine.Container uses an array of containers from Engine.Containers, which is
built under an internal RLock, so the external RLock is useless.
Also allocate enough memory for the array of containers (images).
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>