Hot and cooled baryons in smoothed particle hydrodynamic simulations of galaxy clusters: physics and numerics