vcpu: refactor scheduler config into a new function
vcpu: refactor scheduler config into a new function

Move thread affinity and other scheduler configuration into a new
set_vcpu_thread_scheduling() function, and call that function right away
when each vcpu thread is created. This moves the affinity-related code
out of the runnable_vcpu() function, making the responsibilities of each
function clearer.

The same thread affinity, core scheduling, cgroup membership, and
real-time scheduling priority are applied in the same order as before,
but these are all set up front before any other vcpu setup.

BUG=None
TEST=crosvm run -c 4 bzImage

Change-Id: I825f71fd4a07165190ffe2a04b35ceffe3dc0308
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3719325
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Commit-Queue: Daniel Verkamp <72bc170b46ec491f7bdd4359a1c0bfed274de40c@chromium.org>
Reviewed-by: Keiichi Watanabe <815e4e8f7c92a23424d7c3f51ead622bcedbc720@chromium.org>
Reviewed-by: Junichi Uekawa <6bd240a6ce32463e272bb69c685a8e946b33ac05@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm