[MRG] reduce amount of boiler code in tree/_utils

Inspired from the last @jnothman pull request, I simplify a bit sklearn/tree/_utils.pyx using standard tools (memcpy, one-liner swap).

For tuple unpacking, Cython creates a tmp variable for each RHS expression. In practice it is as fast as using an explicit tmp.