rtu: getConfig shall return unique_ptr

Update the getConfig in PortFactory and related classes to return a
unique_ptr instead of a variable on stack to preserve polymorphic
behavior of the return port config. Without this change the values from
USBPort are dropped when casting from USBPort to PortFactoryConfig.

Change-Id: Ia250771a7fd7aedb133598446aab1e120aaf36b5
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/rtu/port/base_port.hpp b/rtu/port/base_port.hpp
index 6a30dab..b4ca052 100644
--- a/rtu/port/base_port.hpp
+++ b/rtu/port/base_port.hpp
@@ -32,6 +32,8 @@
     PortMode portMode = PortMode::unknown;
     uint32_t baudRate = 0;
     uint16_t rtsDelay = 0;
+
+    virtual ~Config() = default;
 };
 
 template <typename T>