base: replace raw pointers for out-parameters with safer out<T>

Add a zero-cost type-safe abstraction for representing "out" parameters
(i.e. when the calling function has to return multiple results out
by-reference into the argument slots instead of using the return slot).

Change-Id: I33a941e4863b6bed71d2bfa43d7f48e9b111f83f
7 files changed