Pulse-stream techniques and circuits for implementing neural networks