Simplify C array handling in C++ code

Add a constructor to ConstArrayRef that allows implicit creation of
ConstArrayRef from a plain C array.  This makes it possible to write a
function that takes a ConstArrayRef, pass a C array directly, and let
the compiler do the job of passing the size of the array (or complain if
that size is not available).  This is in particular useful for testing;
removed similar template implementations from a few different locations
in test code that this allows.

Change-Id: I3b59c2b911d7c8bd2a95de769426c0878ce36a7e