Complex automorphism groups of real algebraic curves of genus 2 A homological criterion for reducibility of analytic spaces, with application to characterizing the theta divisor of a product of two general principally polarized abelian varieties 