Fix #1991 and #1828.  Integer overlow on Python 3 causes a crash.  Adds a test.
Merge pull request #1991 from mdboom/ticker-overflow

bugfix for matplotlib/ticker.py (python 3.3)