ENH: Rewrite ndimage.label() in Cython

This reimplements ndimage.label() in Cython, with the following results:
+ easier to read code
+ faster (roughly 3x on my MacBook Pro)
+ output array can be nearly any numpy type (not just int32)
+ if passed in, output array is used for scratch space (minimal overhead)

Downsides:
- Uses type templating, so requires a dev version of Cython as of 2012-07
  (Cython 0.17+ should work)
- The type templating results in a very large C file (there's a small
  function that gets instantiated N^2 times for the N types the
  function takes as input/output).

New tests have been added to ensure that label() returns the same
values as before, and to test new functionality (in-place operation).
ENH: halve .c size of ndimage.label, but 2-3 times slower.
MAINT: smaller fused type functions in ndimage.label, .c half as large.
BUG: fix ndimage.label overflow detection label.

Use uint32 as default output type if that's large enough.
MAINT: combine neighbor labeling and final line labeling in ndimage.label.

Simpler and slightly faster.
Merge branch 'cython_ndimage_label' into master.

Reviewed as https://github.com/scipy/scipy/pull/261