Cohomology and Deformations of Hom-algebras