Tanzania teacher, carpenter escape death sentence in murder case