Scala: factorial
Scala: tail recursive version of factorial