First variation of anisotropic energies and crystalline mean curvature for partitions