Illumos 5164+5165 - space_map fixes

5164 space_map_max_blksz causes panic, does not work
5165 zdb fails assertion when run on pool with recently-enabled spacemap_histogram feature
Reviewed by: George Wilson george.wilson@delphix.com
Reviewed by: Christopher Siden christopher.siden@delphix.com

Original author: Matthew Ahrens

References:
  https://www.illumos.org/issues/5164
  https://www.illumos.org/issues/5165
  https://reviews.csiden.org/r/98/

Ported by: Turbo Fredriksson <turbo@bayour.com>