codeprinters: fix Rational's printing for code (as fractions of doubles)

S(4)/3 * x -> (4.0/3.0)*x for ccode, not 4*x/3
ccode: print Rational numbers with long double
printing.rst: fix doctest failures for fcode
Merge branch 'master' into rationals-printing-in-code
Merge branch 'master' into rationals-printing-in-code
added a recursive doit() call in Sum

This enables the evaluation of nested sums.
doc string revesion for Sum
Piecewise._evals_subs doesn't evals every pieces.

Expressions are evaluated only if their condition is not False
and evaluation stops when it evaluates a condition to True,

Adds two tests:
    p3 = Piecewise((1, Eq(x, 0)), (1/x, True))
    p4 = Piecewise((1, Eq(x, 0)), (2, 1/x>2))
    assert p3.subs(x, 0.0) == 1
    assert p4.subs(x, 0.0) == 1
docstring improved for Sum
Piecewise._eval_interval for cond. indep. of integration var.

This fixes the Integral of a Piecewise when the conditions are
independent of the integration variable.

Before:

>>> integrate(Piecewise((0, Eq(y, 0)), (x*y/sqrt(y**2), True)), (x, 1, 3))
4*y/sqrt(y**2)

After:

>>> integrate(Piecewise((0, Eq(y, 0)), (x*y/sqrt(y**2), True)), (x, 1, 3))
Piecewise((0, y == 0), (4*y/sqrt(y**2), True))
Merge branch 'master' into rationals-printing-in-code
Remove Singleton metaclass from NumberSymbol

Subclasses of NumberSymbol should manually set Singleton as their metaclass if
they want to be singletonized.

See issue 3643.
Gauss-Hermite quadrature
Tests for Gauss-Hermite quadrature
Fix various typesetting bugs in quadrature
Add generalized Gauss Laguerre quadrature rule
Improve doc of quadrature rules
Add weight formulae to doc
Add Gauss-Chebyshev quadratures
Gauss-Jacobi quadrature