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 behaviour of this modules is the
same as before.