Training spiking multi-layer networks with surrogate gradients on an analog neuromorphic substrate