A Primer on Memory Consistency and Cache Coherence (Synthesis Lectures on Computer Architecture)