Remove unsused code (minor)

James Bergstra added the assert in 2010; 
it was not triggered since then so maybe 
this code can finally be removed?
Fix missing variable renames
Added second derivative to max downsampling function
Use numpy's officially supported api for retrieving BLAS compilation options
Allow to reuse the NVCC_compiler without cuda_ndarray lib.

Needed for the new gpuarray.
Speed up MaxAndArgmaxOptimizer.

This is done by making it a local optimizer. This change to allow
local optimizer to remove variable in the graph. I allow this only for
variable that aren't used.

In a small test case, it wsa taking 0.6s now it take .1s. In a bigger
test case, it was taking 40s. I didn't rerun it with the opt as it is
too long.

This speed up the opt, as we do less iteration on the graph, as in the
EquilibriumOptimizer add in the current iteration the new node in the
graph. The old opt wasn't doing this and I didn't wanted to duplicate
all those type of code.
more profiling
more error info.
Add profile to witch feature is taking time.
Add missing import for python 2.4
Make shape feature prefer constant.
pep8
2 small speed up
Speed up the ShapeFeature by skipping call to ancestor() during the MergeOptimizer.
some pep8
Make NodeFinder hashable.

This is needed for the new profiling of features.
Merge pull request #1596 from delallea/minor

Minor fixes
Add comment following code review.
Merge pull request #1594 from nouiz/faster_opt

[MRG] Fix test python 2.4 and faster opt
Fix python 2.4 syntax.