Use min/max templated functions from std

TODO:

- [x] Get rid of the `D9025: overriding '/DNOMINMAX' with '/UNOMINMAX'` warning.

One possible solution is to duplicate common.props and just not define `NOMINMAX` there. But I'm not very keen of duplicating stuff. Any ideas are welcome.