CMake: Moved swig macros to functions
CMake: Moved swig macros to functions

Switched these macros to functions so changes at the
upm_swig_<extension> level don't propogate further than necessary.

Signed-off-by: Noel Eck <1e36ab6ededef40f3f16bdbc1b09eee72c5d08cf@intel.com>

intel-iot-devkit/upm,intel-iot-devkit/upm,Propanu/upm,pylbert/upm,Propanu/upm,pylbert/upm,stefan-andritoiu/upm,malikabhi05/upm,pylbert/upm,g-vidal/upm,pylbert/upm,pylbert/upm,g-vidal/upm,intel-iot-devkit/upm,Propanu/upm,pylbert/upm,malikabhi05/upm,stefan-andritoiu/upm,malikabhi05/upm,malikabhi05/upm,g-vidal/upm,g-vidal/upm,malikabhi05/upm,stefan-andritoiu/upm,intel-iot-devkit/upm,Propanu/upm,intel-iot-devkit/upm,stefan-andritoiu/upm,stefan-andritoiu/upm,g-vidal/upm,malikabhi05/upm,stefan-andritoiu/upm,Propanu/upm,g-vidal/upm,Propanu/upm,intel-iot-devkit/upm