Cluster algebras IV: Coefficients