Small refactoring to speed up get_scalar_constant_value.

This make less condition being tested. It speed up the slow scan tests.
Simplify Elemwise.perform. Now all inputs have the same ndim. No need of padding.
numpy dtype are correctly compared again string.

Speed up. get_scalar_constant_value and slow scan test.
Elemwise.perform don't prealloc output as we don't use it!