sched: reduce number of wakeup IPIs

Each time thread is woken on a remote cpu IPI is sent to a cpu the process
belongs too in order to run scheduler there. This causes a lot of IPIs
to be sent. We can avoid sending an IPI if we know that rescheduling
will happen on a remote cpu in a reasonable time frame.  Usually if cpu
is not idle the scheduler will run there in a reasonable time frame, but
there is a pathological case where there is only one running process on
a cpu and it never sleeps. To accommodate for this case this patch avoids
sending IPI only if there is more than one runnable processes on a remote
cpu which means that scheduler will run shortly to switch running threads.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>