##### SUMMARY

`docker_container` module often fails because removal of `auto_remove: yes` takes some time. I had the same problem before with shell scripts since `docker stop` returns immediately but container removal takes some time to finish. Until removal is finished, no new container with the same name can be created.

The error message is:

    Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.")

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
docker_container

##### ANSIBLE VERSION
```
ansible 2.9.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/USER/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17rc1 (default, Oct 10 2019, 10:26:01) [GCC 9.2.1 20191008]

```

##### CONFIGURATION
_no changes_

##### OS / ENVIRONMENT
Ubuntu 19.10


##### STEPS TO REPRODUCE

0. Run playbook to create container
0. Apply many changes to the file system
0. Run playbook again

```yaml
docker_container:
  name: SOMETHING
  image: SOMETHING
  state: started
  detach: yes
  recreate: yes
  autoremove: yes
```

##### EXPECTED RESULTS
Wait for removal before trying to create a new container.


##### ACTUAL RESULTS
Command fails.

```
Error creating container: 409 Client Error: Conflict ("Conflict. The container name "/MYCONTAINER" is already in use by container "HASH". You have to remove (or rename) that container to be able to reuse that name.")
```


'''
    Compare values a and b as described by method and datatype.
    Returns ``True`` if the values compare equal, and ``False`` if not.
    ``a`` is usually the module's parameter, while ``b`` is a property
    of the current object. ``a`` must not be ``None`` (except for
    ``datatype == 'value'``).
    Valid values for ``method`` are:
    - ``ignore`` (always compare as equal);
    - ``strict`` (only compare if really equal)
    - ``allow_more_present`` (allow b to have elements which a does not have).
    Valid values for ``datatype`` are:
    - ``value``: for simple values (strings, numbers, ...);
    - ``list``: for ``list``s or ``tuple``s where order matters;
    - ``set``: for ``list``s, ``tuple``s or ``set``s where order does not
      matter;
    - ``set(dict)``: for ``list``s, ``tuple``s or ``sets`` where order does
      not matter and which contain ``dict``s; ``allow_more_present`` is used
      for the ``dict``s, and these are assumed to be dictionaries of values;
    - ``dict``: for dictionaries of values.
    '''
    if method == 'ignore':
        return True
    
    if a is None or b is None:
        
        if a == b:
            return True