Optimize inference
This is the current structure of an autodifferentiable layer:

https://github.com/mratsim/Arraymancer/blob/90263efabdf706d7a74c1d847b7449495d67c124/src/autograd/gates_basic.nim#L22-L60

Only the last part "Caching for backprop" that initializes the result gradient with a zero-ed tensor is skipped in inference mode.

We could skip every `node` operations and even the `gate` part can be skipped. A gate is needed for forward but we could use an `inference` proc instead (so we would have forward, backward and inference), that would avoid several heap allocations.