PEP8/flake8 fixes in tensor/basic.py

Remaining errors are lines too long in comments or C code.
Import SpecifyShape and specify_shape in tensor

not tensor.basic
Fix another import
Merge pull request #2205 from lamblin/pep8_tensor_basic

PEP8/flake8 fixes in tensor/basic.py