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.