Contractive metrics for nonlinear hyperbolic systems