assert that there are no outstanding Get*Critical requests during allocation

When GetStringCritical or GetPrimitiveArrayCritical are called, the VM
cannot risk new Java heap allocations until the corresponding release
method is called because allocations may result in GC, which cannot
happen while a string or array is pinned in memory.  We already have a
check for this latter in the footprint function used during GC, but
it's best to catch the problem as early as possible.