Remove possilbe leaks in dalvik.

Add missing free() calls.

Change-Id: Id602b84ba8f15fef1851f37e3d5aac214ac67de1
Optimize dvmHash Loops.

pHashTable->tableSize is working as volatile variable & is evaluated on every iteration.
Help compiler to define tableSize as local(Register) variable.

Change-Id: Iecdea3ecb810319d461ff3924ef21fd6c2d69d1e
Change NewDirectByteBuffer to allow NULL if capacity == 0.

Also make the diagnostics more uniform.

Bug: 7892060
Change-Id: Ib3ca0d6241a5958d2c8681337b1883fc3d74cb54