Harmonized expand, expandAs and repeatTensor

Like the `view` method, the subject methods now accept an optional `result` tensor. The PR includes two new unit tests : `expand` and `repeatTensor`. 

Also fixes #59.
Nowhere, its just really useful when you want to evaluate if an object is a tensor:
```lua
if obj.isTensor then
    etc.
end
```