From Large to Small Polarons in Lead, Tin, and Mixed Lead-Tin Halide Perovskites