There are some other answers already regarding whether or not these rules apply to on-duty Police officers but I think you're missing the point.
There seems to be a broad based perception these days that the Police don't obey the rules regarding use of force and they are not proscuted when they break them.
This might mean that the original statement: "the police can legally ... kick the shit out of you" is technically innacurate but it is functionally accurate. The Police do not appear to large swathes of the general public to be at risk of prosecution for beating the shit out of suspects (which basically means anyone they want to).