Hard lubricating coatings for cutting and forming tools and mechanical components