Excitons in silicon diodes and solar cells: A three-particle theory