Remove shadowed id kwarg and make valid and invalid functions private

Changed all shadowed references of ```id``` to ```id_```. 
This resulted in changing ```valid``` to ```_valid``` and ```invalid``` to ```_invalid```. 
Both functions were only called within ```salt/modules/dockerio.py```.

Fixes #13067