Separate container iteration, filtering and reducing. This will make easier in the future to improve the implementation of docker ps as we know it. The end goal is to unify the objects returned by the api for docker ps and docker inspect, leaving all docker ps transformations to the client. Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: 06699f73fb6d779894a875f9177afc5a1f3bc5b3 Component: engine