Refactor Theano benchmark, add some features

This refactors and cleans up the Theano benchmark code, and adds some features:
* Every compiled function is run once before running it in a loop to time it, mainly to allow setting up the FFT plan in the FFT-based convolution (for me it changed the timing of the FFT-based forward pass)
* If pyCUDA is available, timing is done via CUDA events (but it seems this doesn't make a difference; I guess before a compiled Theano function exits, the device is synchronized anyway so we cannot insert the "stop" event into the correct position in the stream)
* You can optionally specify which of L1 to L5 to test, by giving numbers from 1 to 5 on the command line
* Similarly, you can specify custom configurations on the command line (e.g., `i3x80x15,k32x3x7,b256`)
* The benchmark includes the work-in-progress wrapper of caffe's convolution as a Theano op (not to be included in the results table, at least not yet)