conv2d meta-optimizer missing commits

This just adds the commits that got lost from #2266 in a late-night rebase yesterday (with the first one changed because we cannot rewrite history in a PR).

(@maintainers: You might want to merge things on the command line from time to time instead of requiring third-party contributors to rebase their requests again and again. Of course sometimes they're the only ones who know their code well enough to do the rebase, but sometimes it's the other way round and sometimes it's just a trivial conflict that maintainers can solve just as well as part of the merge. This being said, I'm of course grateful you keep Theano that lively and well, and make it possible to contribute in a timely fashion!)

@nouiz: Regarding 07dd0f1, note that we're actually calling the function more than once (currently three times, but that could be configurable) to get a good timing. At least for FFT this is absolutely necessary because the first call takes more time. Should we keep output borrowing then?