CMake: turn mbed_greentea_add_test() into a function
CMake: turn mbed_greentea_add_test() into a function

Unlike a macro, a function is more self-contained and can return
early if necessary.

mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed