A method to quench and recharge avalanche photo diodes for use in high rate situations