Jordan groups and automorphism groups of algebraic varieties