Fix initialization of matrices and fix _hnf_mod()
Trac #17121: LatticePoset: Add meet_irreducibles, faster is_distributive

Finite lattice posets now has `join_irreducibles()` and
`join_irreducibles_poset()`. Add `meet_irreducibles()` and
`meet_irreducibles_poset()`.

`is_distributive()` is now based on formal definition. It can just check
that lattice is graded and that number of both meet- and join-
irreducibles equals to rank (=height-1) of the lattice.

URL: http://trac.sagemath.org/17121
Reported by: jmantysalo
Ticket author(s): Jori Mäntysalo
Reviewer(s): Nathann Cohen
Trac #16996: IPython notebook with Sage Extensions

Make the IPython html-based notebook work just like the sage command
line.

In particular: make zeromq and pyzmq standard packages.

Screenshots: https://plus.google.com/photos/113188225509686176367/albums
/6061181433704732017

URL: http://trac.sagemath.org/16996
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s): Karl-Dieter Crisman, Sébastien Labbé, John Palmieri, Eric
Gourgoulhon, Steve Singleton
Trac #17094: Fix memleaks and brokenness of non-FLINT methods after #16803

non-FLINT methods are seriously broken after #16803:
{{{
sage: a = zero_matrix(QQ,3)
sage: b = identity_matrix(QQ,3)
sage: a.minpoly()
x
sage: b.minpoly()
x - 1
sage: a.minpoly('y')
y - 1
}}}

Also, using linbox or iml and modifying a matrix leaks memory:
{{{
sage: v = vector([0]*1000)
sage: M = identity_matrix(ZZ,1000)
sage: while True:
....:    _ = M._solve_right_nonsingular_square(v)
....:    M[0,0] = 1
....:    print get_memory_usage()
}}}

Also, use type `int` for `_hnf_mod()` (anything larger than `2^31-1`
isn't supported anyway).

URL: http://trac.sagemath.org/17094
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Volker Braun