Label3d

This pull request features two things:

1. 2D labelling refactoring. This has resulted in:
   * Higher readability of the code by breaking large functions into smaller ones.
   * More exhaustive documentation of the code.
   * Better performance.

2. Addition of support for 3D arrays.

I have read the papers that were referenced in the code. I think have understood them to let's say 90%, but I have found the implementation of the 2D labelling slightly different than the algorithm described in the paper by Kensheng et al. (there is no decision tree and also only one iteration is performed).
I have therefore implemented the 3D in an analogous manner. Since it has passed my (simple) test cases, I think that it is time to come up with it and get some feedback from you guys.
I think it's way clearer than neighbors, precisely because of its trivial generalisation to nD. It has a clear interpretation: number of orthogonal hops you can make from the starting point. 4-, 8-, 6-, 18-, 26-connectivity have no rhyme or reason. It's a historical accident that they are more commonly known. I suggest we join scipy in eliminating the nasty effects of that accident. =P

Binary structures are a pain in the ass to specify. Big -1 for those. (I very often wish morphological operations would take a connectivity argument instead of a structuring element.)

We could accept both forms with a single "connectivity" kwarg (again, there is precedent for this, and anyone can use what they're happiest with). This would match both Matlab notation ("conn") for 4- and 8- neighbors and scipy notation for 1-ndim connectivity.