Trac #11631: fix cuspform_lseries() for non-rational newforms

We add a parameter to cuspform_lseries() so one can specify which of the
conjugates of the newform to use (defaults to 0). The order is arbitrary
as it comes from the embeddings() method for self.base_ring()
Explicitly close IPython history database
Trac #11631: L-series attached to cusp forms are broken

{{{
sage: C = CuspForms(43,2)
sage: N = C.newforms('a')
sage: f = N[1]
sage: L = f.cuspform_lseries()
Boom!
}}}

There are two issues:

  (1) the code doesn't work at all when the degree of the form is > 1,
which is the main interesting case,

  (2) the name "cuspform_lseries" is bad, since f is already a cuspform,
and we use the name "lseries" in all other places (e.g., elliptic
curves, abelian varieties), so it is hard to find.  In fact, I didn't
even think to look for cuspform_lseries, instead only finding this via
lots of grepping and reading source code.

So to fix this issue, I think (1) the bug should get fixed, and (2) the
name should be changed (actually *deprecate* the old name as explained
in the developers guide and introduce the name lseries).

See also #12015.

The part about deprecating cuspform_lseries() is moved to #16917.

URL: http://trac.sagemath.org/11631
Reported by: was
Ticket author(s): Gonzalo Tornaría
Reviewer(s): Michael Neururer
Trac #16745: Random OperationalError: disk I/O error

I see this occasionally on different buildbots, so it is not a hardware
problem. Looks like a race with the IPython sqlite history database.
{{{
sage: sig_on_count() ## line 923 ##
0
sage: ascii_art(tuple(DyckWords(3))) ## line 933 ##
(                                   /\   )
(            /\    /\      /\/\    /  \  )
( /\/\/\, /\/  \, /  \/\, /    \, /    \ )
sage: sig_on_count() ## line 937 ##
0

**********************************************************************
Traceback (most recent call last):
  File "/Users/buildslave-sage/slave/sage_git/build/local/lib/python2.7
/site-packages/sage/doctest/forker.py", line 2117, in __call__
    atexit._run_exitfuncs()
  File "/Users/buildslave-
sage/slave/sage_git/build/local/lib/python/atexit.py", line 24, in
_run_exitfuncs
    func(*targs, **kargs)
  File "/Users/buildslave-sage/slave/sage_git/build/local/lib/python2.7
/site-packages/IPython/core/interactiveshell.py", line 3189, in
atexit_operations
    self.history_manager.end_session()
  File "/Users/buildslave-sage/slave/sage_git/build/local/lib/python2.7
/site-packages/IPython/core/history.py", line 525, in end_session
    len(self.input_hist_parsed)-1, self.session_number))
OperationalError: disk I/O error
}}}

See also #16372.

URL: http://trac.sagemath.org/16745
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s): William Stein