Add contract for number of denominators

#2749
Make continued fraction generic because of the comparable interface

Mark the final implementations of the continued fraction.
Remove generic type of continued fraction.
Set release version 2.2
Fix output.