CLN: revisit build warnings in cython templates
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Retrying dropped portions from #27157, which amend cython templates, to deal with special-cases based on type. In this Pr, compiler warnings about  `x==x` being useless in the case of ints, but not floats (since `nan!=nan`).

In https://github.com/pandas-dev/pandas/pull/27157#discussion_r299103166 these were rejected because there wasn't agreement about how this should done and a separate discussion was requested. Annoyingly, these changes agree with what already exists in these files (in multiple places):

https://github.com/pandas-dev/pandas/blob/355e322b5ed4a31c9e1cab9652510e85a54f23a3/pandas/_libs/groupby_helper.pxi.in#L212-L216

But the file is already inconsistent in how these type checks are done:

https://github.com/pandas-dev/pandas/blob/355e322b5ed4a31c9e1cab9652510e85a54f23a3/pandas/_libs/groupby_helper.pxi.in#L391

Making a decision here also required to get rid of the warnings mentioned in https://github.com/pandas-dev/pandas/issues/27169, in that case fused types which mix signed/unsigned trigger warning when the code later includes comparisons with a signed quantity. So there too, type checks in the template are the obvious fix.

cc @WillAyd, @jreback 
