Improve ASH with constant counts, fix constant detection on some of the other operators.
Improve ASH with constant counts, fix constant detection on some of the other operators.

AugustusHuang/Mezzano,varjagg/Mezzano,rvedam/Mezzano,rvedam/Mezzano,varjagg/Mezzano,froggey/Mezzano,froggey/Mezzano,AugustusHuang/Mezzano