Implement operations on variables
I hope I am not bothering you too much by asking questions in the issue tracker, in case let me know.

This time I am trying to port operations from the tensor level to the variable level. For instance, here is what happens if I try to take the mean along a particular axis for a variable:

```python
# part of python code I am porting
mean = input.mean(-1, keepdim=True)
```

```nim
# trying to do the same in Nim by explicitly passing
# the last axis instead of -1, followed by unsqueeze
template dimensions[TT](v: Variable[TT]): int =
  v.value.shape.len

proc forward(ln: LayerNorm, input: Variable): Variable =
  let
    L = dimensions(input) - 1
    mean = input.mean(L).unsqueeze(L)
```

I get an error

```
Error: type mismatch: got <Variable[Tensor[system.float32]], int>
but expected one of: 
proc mean[TT](a: Variable[TT]): Variable[TT]
proc mean[T: SomeInteger](t: Tensor[T]; axis: int): Tensor[T]
  first type mismatch at position: 1
  required type: Tensor[mean.T]
  but expression 'input' is of type: Variable[Tensor[system.float32]]
proc mean[T: SomeFloat](t: Tensor[T]): T
  first type mismatch at position: 1
  required type: Tensor[mean.T]
  but expression 'input' is of type: Variable[Tensor[system.float32]]
proc mean[T: SomeFloat](t: Tensor[T]; axis: int): Tensor[T]
  first type mismatch at position: 1
  required type: Tensor[mean.T]
  but expression 'input' is of type: Variable[Tensor[system.float32]]
proc mean[T: SomeInteger](t: Tensor[T]): T
  first type mismatch at position: 1
  required type: Tensor[mean.T]
  but expression 'input' is of type: Variable[Tensor[system.float32]]
```

Apparently, the operation of taking the mean of a tensor along some axis **is** already supported. I am not sure how to lift this to the variable level.

I have a similar issue in trying to compute a softmax: it is implemented for tensors, but not for variables. (actually I would need log_softmax, but that's for another moment, let's start with what we already have) Should I define manually a backward propagation operator? Or can autograd help me in these simple cases?

I guess these questions are a little silly, but not being familiar with the inner working of Arraymancer even small issues like these can leave me unsure how to proceed