Added totient function (phi)

- Discovered some interesting properties of the totient function (see source).
- Also figured out Scala guard patterns, and converted `gcd` to use them.