Make Fraction serializable (since EventResults is sent over I/O)

I should probably ensure that any Fractions that are read from
serialization are valid (no zero denominator, canonicalization...).
Otherwise, a malicious stream could mess up the logic.