Avoid wrapping Class in WeakReference when class loader is null.

Fix a missing case from one constructor by delegating to another.

Change-Id: I8b85c97586dde2d72c9ac21216c594aa810d761b
Fix abuse of Runtime.freeMemory.

Runtime.freeMemory is the largest allocation that's
possible *without a heap expansion*. That's a poor proxy
for "can i allocate this byte array" and leads to flaky
CTS tests.

bug: 17021619
Change-Id: I108138bf2402e899a40a0b3081c083f733e7c999