Unify the take glue functions for unique pointer types

These glue function just return void, no point in having a copy for each
type.