Fixes #1630.  When callbacks were deleted, the cid map was not correctly updated.
Closes #1636.  When plotting a hexbin on a log scale, the "trick" to reuse the polygons can't work, so revert to the old method where each polygon is independent.
PEP8 fixes.
Seed the random number generator in the hexbin_log test
Merge pull request #1630 from mdboom/reconnect_callbacks

A disconnected callback cannot be reconnected
Merge pull request #1636 from mdboom/hexbin-log

hexbin log scale is broken in matplotlib 1.2.0
Legend: Also calc the bbox of the legend when the frame is not drawn. This fixes gh1586