Cotangent cohomology of a category and deformations