ubsan shift fixes

Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned.

Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros.

R=reed@google.com,mtklein@google.com
BUG=skia:4633

Review URL: https://codereview.chromium.org/1503423003
diff --git a/tests/RandomTest.cpp b/tests/RandomTest.cpp
index 8d93d87..448f073 100644
--- a/tests/RandomTest.cpp
+++ b/tests/RandomTest.cpp
@@ -119,7 +119,7 @@
 
     // now make some strings and track them
     for (int i = 0; i < kN; ++i) {
-        value <<= 1;
+        value = SkLeftShift(value, 1);
         unsigned int rnd = rand.nextU();
         value |= ((rnd >> shift) & 0x1);