ObjectFactory: avoid using ReflectionClass
Add a new ObjectFactory::constructClassInstance() method that uses
a loop unrolling type of technique to avoid using ReflectionClass when
creating new class instances with 10 or fewer constructor arguments.
I really wanted to also include the use of PHP 5.6's `...` splat
operator when supported but there is no way to conditionally use a new
operator in a way that still allows older versions of PHP to parse the
same source file.
Bug: T115729
Change-Id: Ia29c4526f4bac51696654c9b0677cb3f70359966