Use container.Lock in public ToDisk method

Here was possible race with inspect where we changing HostConfig.Links
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Merge pull request #6979 from LK4D4/fix_race_inspect_start

Use container.Lock in public ToDisk method