Added nn.Max() for CUDA, with restrictions.

The main restriction is the dimension, which has the
be the innermost dimension.