cmake: Fix CMAKE_REQUIRED_FLAGS corruption
cmake: Fix CMAKE_REQUIRED_FLAGS corruption

The --print-memory-usage check was accidentally corrupting the
CMAKE_REQUIRED_FLAGS variable due to a variable de-referencing bug.

This was affecting app CMakeLists.txt code that was using
CMAKE_REQUIRED_FLAGS.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

GiulianoFranchetto/zephyr,kraj/zephyr,aceofall/zephyr-iotos,mbolivar/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,zephyriot/zephyr,explora26/zephyr,punitvara/zephyr,aceofall/zephyr-iotos,punitvara/zephyr,punitvara/zephyr,ldts/zephyr,nashif/zephyr,aceofall/zephyr-iotos,ldts/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,finikorg/zephyr,finikorg/zephyr,mbolivar/zephyr,kraj/zephyr,explora26/zephyr,mbolivar/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,nashif/zephyr,punitvara/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,finikorg/zephyr,Vudentz/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,explora26/zephyr,kraj/zephyr,explora26/zephyr,mbolivar/zephyr,Vudentz/zephyr,galak/zephyr,kraj/zephyr,zephyriot/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,kraj/zephyr,zephyriot/zephyr,mbolivar/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,nashif/zephyr,zephyriot/zephyr