Influence of the Thickness of a Nanolayer Composite Coating on Values of Residual Stress and the Nature of Coating Wear