renamed product() as cartesian_product() to avoid confusion with
math2.product

last() rewritten, simpler and no lambda Py3 hassle
added sign() and cmp() for Py3
explicitly define the most common asserts to avoid "undefined variable"
messages in IDEs
added tests and removed unused imports
removed quantile_fit (too specialized)
what about pdfminer.six==20140915 ?