Add tests calling op.grad() to check if None are returned
Change minimum/maximum grad to raise NotImplementedError for complex

instead of AssertionError, so it gets correctly detected by new test.
Add dtype arg to ScalarVariable.zeros_like
Remove None from return values of grad.

Also change checks to verify the output dtype of the Op itself, not of
the inputs or gradient, because it can depend on different things.
The idea is that if the Op's output is continuous, then the gradient
should be propagated to the inputs, regardless of whether they are
continuous or discrete. However, if the output is discrete, then the
gradient wrt the inputs will be a continuous zero.
Move condition earlier to avoid useless computations
Merge pull request #1537 from lamblin/fix_grad_none

Do not return None in scalar op's grad, add tests