[FLINK-1218] Don't use "new Integer". Use "Integer.valueOf" instead.

There are lots of "new Integer" or something like it in the code.
We should use valueOf to avoid wasted instance creation.
It would be better to do this via
`return new Tuple2<Long, Long>(left.f0, right.f1);`

That avoids creating new boxed Longs entirely, just reusing the previous ones.