Merge branch ticket/15515 into ticket/16608 to create ticket/16645.
Always use graphics_filename instead of tmp_filename.

Since graphics_filename was changed to return a tmp_filename except when run
in embedded mode, we may always call that and leave the case distinction to
it.  This re-enables the automatic display of images in notebook if the gif
or ffmpeg methods are called without a filename.
Prevent doctest from leaking file into current working directory.

Now that the special case for DOCTEST_MODE in Graphics.show is gone,
we have to be more careful about where we place our output files.
Latex formatting for algebraic numbers.
Trac #16495: Latex formatting of rational algebraic numbers

I'm a bit surprised by the way algebraic numbers which are indeed
rational get represented in LaTeX code. Consider the following case:

{{{
sage: latex(29/10)
\frac{29}{10}
sage: latex(AA(29/10))
\text{\texttt{29/10}}
}}}

Is it intentional that these two look different? If so, I guess this
might be to make the representation of algebraic numbers consistently
single-line, but even then, the `\text` and `\texttt` formatting seem
wrong to me.

URL: http://trac.sagemath.org/16495
Reported by: gagern
Ticket author(s): Martin von Gagern
Reviewer(s): Volker Braun
Trac #16645: Restore displaying animations in notebook

#12827 broke display of animations, and while #16608 restored that
functionality for `Animation.show()`, it remains broken for methods
`Animation.gif()` and `Animation.ffmpeg()`. Based on #15515, a more
complete fix is possible.

URL: http://trac.sagemath.org/16645
Reported by: gagern
Ticket author(s): Martin von Gagern
Reviewer(s): Volker Braun