Add relabel_connected function
Speed improvements, and safe casting
Add connectivity support
Improve performance by preallocating memory
Merge pull request #30 from jni/relabel

Add function to relabel connected components when no 0-boundary exists.