Use std::unique_ptr to manage the memory
Use std::unique_ptr to manage the memory

Currently we use new operator to allocate variable of type
rmw_qos_profile_t and return raw pointer later, which may
lead to memory leak in some case.

In this patch, we will leverage std::unique_ptr to take the
ownership of the allocated memory to avoid not deallocating
the memory later.

Fix #380

RobotWebTools/rclnodejs,RobotWebTools/rclnodejs,RobotWebTools/rclnodejs,RobotWebTools/rclnodejs,RobotWebTools/rclnodejs