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.
Replace the try..except with:

self.asserRaises(AttributeError, as_tensor_variable, bad_apply_var)