kernel: Don't _arch_switch() to yourself
kernel: Don't _arch_switch() to yourself

The SMP testing missed the case where _Swap() decides to return back
into the _current.  Obviously there is no valid switch handle for the
running thread into which we can restore, and everything blows up.
(What happened is that the new scheduler code opened up a spot where
k_thread_priority_set() does a _reschedule() unconditionally and
doens't check to see whether or not it's needed like the old code).

But that isn't incorrect!  It's entirely possible that _Swap() may
find that no thread is runnable except _current (due, for example, to
another CPU racing the other thread you expected off to sleep or
something).  Don't blow up, check and return a noop.

Signed-off-by: Andy Ross <c70f9a6bf6ee0cd69c8af4ce5e6b131945769315@intel.com>

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