A former Victorian primary school teacher who preyed on teenage boys for more than a decade has avoided jail.