New codes introduced a new method to wait container's exit code and
removal via Events API, but it specified a "since" filter based on
client side clock, which sometimes isn't synced up with daemon's clock,
hence leads the client to hang on waiting container's exit status.
This commit brings the Events call before start, and removes the time
filter, so that it can catch daemon events correctly without care of the
clock issue.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>