Effect of reactive gas composition on the microstructure, growth mechanism and friction coefficient of TiC overlayers