Fix long-standing switchuvm() inconsistency.
Fix long-standing switchuvm() inconsistency.

switchuvm() is supposed to switch the TSS and page table to the
process p it is passed. Alas, instead of using p to access the
kstack field, it used the global proc. This worked fine because
(a) most uses of switchuvm() pass proc anyway and (b) because in
the schedule, where we call switchuvm with the newly scheduled
process, we actually set the global proc before the call. But I
think it's still a bug, even if it never broke a test case. :-)

shyandsy/xv6,shyandsy/xv6,shyandsy/xv6,shyandsy/xv6,shyandsy/xv6