Maxout now supports more than 2 dims

I talked about this kind of reshaping with Fred once, and he suggested the best way of doing it was:
```python
output_dim = inp.shape[1] // self.num_pieces
new_shape = [inp.shape[i] for i in range(inp.ndim - 1)] + [output_dim, self.num_pieces]
```
Not sure if it makes a difference optimisation-wise, but this is the way I've done it in Pylearn2.