miscellaneous: signed->unsigned min, max, etc

we can introduce explicit signed functions if it becomes necessary, but for now, the minimum change is this one.