Add support for long term locking.

Even though the basic idea is to have a keep-alive process refresh the hold
on the lock, it is easy to add in the ability to set the expiration time into
the future. This exposes this capability, which can be used to manually lock
and release resources to prevent any automated processes from using it.
Make the grab.py client use python's json

Only fall back on own insecure eval() based implementation
if python's "json" module is unavailable.

Also, added a unit test for both the grab.py client and
the local json module implementation.

Added .gitignore