Add minibatch support for nn.JoinTable and nn.SplitTable

The method setNumInputDims allows forwarding both minibatch and
non-minibatch tensors through the same module.

If this method is not used, the behaviours is the same as before.