Developmental Plasticity-Inspired Adaptive Pruning for Deep Spiking and Artificial Neural Networks