dockertest.containers: Add get_unique_name function

The first commit is from another pull request. In the actual commit the `stop` test is modified to use this function.

Please note that this pull request is dependent on https://github.com/autotest/autotest/pull/811