add getnext/getprevious to CLI utility
Fix typo in script's setting for JAVA_HOME.
Fix race condition caused by unlocking and relocking during PDU freeing.

Rather than unlocking and immediately re-locking inside KineticAllocator_FreeItem,
just retain the lock and inform KineticAllocator_FreeItem that it should not
re-lock the mutex. This would be better handled by configuring the mutexes as
recursive/counting, but as we are discussing changing the threading model soon,
it is probably not worth restructuring the mutex initialization at the moment.