Update KDL SegmentMap interface to optionally use shared pointers

The KDL Tree API optionally uses shared pointers on platforms where
the STL containers don't support incomplete types.

This is the same change as in #43 but for the indigo-devel branch.