Add type variances for doOnEach actions.

This fixes the use of contravariant actions.
Merge pull request #560 from landonf/java-do-variances

Add type variances for doOnEach actions.