Model of single-electron performance of micropixel avalanche photodiodes