elliptic integrals (issue 2063)

It's a major rewrite of PR #1408 (seems abandoned).  This pull uses the forms with optional arguments for incomplete integrals.