Less copying-around of point clouds

Two patches:

* the first uses `shared_ptr` in a smarter way than is done currently, to prevent lots of copies being made, as well as getting rid of some casts;
* the second refactors the registration code to get rid of some duplication, and runs registration algorithms without the GIL.

Please see the commit messages for details.