v2: manager: factor out memory.events parsing
v2: manager: factor out memory.events parsing

This makes waitForEvents() more shorter and more readable.

Signed-off-by: Jeremi Piotrowski <25ee211a3db63eaa589caca022f2148654832f62@microsoft.com>

containerd/cgroups