Additions to Continued Fractions Package

This PR is to replace PR#7531 (https://github.com/sympy/sympy/pull/7531), which was committed on the master branch by mistake.  It includes that code, fixes to it (in response to commentary), and also some new functions and tests.