Switch to Google indentation style

The clang-format tool can automatically indent code to Google's style guide,
but does not support indenting in the GNU style.  For this reason alone, I
prefer the Google style.

All changes in this commit were automatically generated by:

  clang-format --style=Google

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Convert draw-gl-30.c to C++

Including replacing a dynamic array with std::vector.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Reduce lock contention in draw code

Instead of holding the buffer lock for the duration of the GL command creation
sequence, we copy the terminal buffer under a lock and release it before
calling GL.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Use smart pointers everywhere

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>