I had all the cursor issues and the flashing magenta screen and what not with my MBA. Took it to the Apple store and they did the hardware check. All good. It had some odd behavior but worked. Did all the jazz with safe mode, reloading system software. Updates too. Sometimes it changed things, but never fixed it. Putting it to sleep made it non-functional till I restarted so I developed a routine of using it in the morning and shutting it down.
Here's an odd clue. I use the Dvorak keyboard. When I started it up, it asked for my password in the US keyboard which it doesn't do when its working normally.
So eventually I contacted Apple and they offered to change it out. Mail or at a store? I was anxious so I took it to the store. When I got there it worked perfectly. Man, I was deflated.
I went on my way and it worked after that, although fo a while it asked for my password with the US keyboard, but now everything seems ok. It took me a while to not fear every time I woke it up.