Fix opt error when trying to access a python list with a Scalar Type object.

fixes gh-1288
make linker=py use the theano flag allow_gc. It don't change the default.

Also add doc about witch linker support allow_gc.
small code clean up.
make comparison test better.

In NumPy, I have a PR that make it use array_priority for comparison. The new test assert that it don't work, or work correctly.
Add comment per review.
make tests more strict.
also support numpy.integer
Merge pull request #1379 from nouiz/fix_opt_crash

Fix opt error when trying to access a python list with a Type object.