Ban d3.max and d3.min across the project. Close #843

Close #843.
New version of #879 

the second signature includes a mandatory 3rd argument. it is impossible to have the 2nd argument be optional if the 3rd argument is mandatory (think about it)