Completed TODO in tensor.py:as_tensor_variable which said to use the App...

...ly default output mechanism.

Added tests to excited the various possible failure scenarios.
Forget this comment. x.op.default_output is an int, but x.default_output is a function that do that I told. So it seem good.