Unifying Activation- and Timing-based Learning Rules for Spiking Neural Networks