Fix bug wth all 'n's dist tuple.

Also refactor make_grid_shape. Combine validate_grid_shape and
normalize_grid_shape. Add regression test. A fix a few style faux pas.
Address @kwmsmith'scomments.
is -> ==

as suggested by @kwmsmith
Merge pull request #396 from cowlicks/recurs-bug

Fix bug wth all 'n's dist tuple.