MFC r271762: Switch to text mode in UEFI boot

    The loader previously failed to display on MacBooks and other
    systems where the UEFI firmware remained in graphics mode.

    Submitted by:       Rafael Espindola

Approved by:	re
Spelling, grammar and punctuation fixes.

Approved by:	re (gjb)
Make sure all memory updates are made visible before we let go
of the thread in cpu_switch(). It's otherwise possible that on
another CPU the thread continues from stale context data.

Note that this is prominent on newer CPUs, like the Montecito,
that really take advantage of the weak memory ordering. First
generation Itanium 2 is not that aggressive and does not need
this.

This is a direct commit to stable/10.

Approved by:	re@ (gjb)