Tropical methods in the moduli theory of algebraic curves