kernel/idle: fix rt_thread_idle_excute in high optimization level

The rt_list_isempty has prototype of "int rt_list_isempty(const rt_list_t *l)".
So the compiler has a good reason that the rt_thread_defunct list does
not change within rt_thread_idle_excute thus optimize the "while" loop
into a "if".

So add the volatile qualifier when test against the rt_thread_defunc list.