pkg: add prototype flocking package

Add a simple package to facilitate placing an flock on directories. This
will be use to coordinate state between running containers and rkt
status/gc tools.
pkg/lock: cleanups, blocking vs. nonblocking calls, FD extraction
rkt gc: implement gc

Container directories deemed inactive by exclusive lock acquisition are
atomically renamed to /var/lib/rkt/garbage, the directory's ctime gets
updated as part of the rename.

The /var/lib/rkt/garbage directory is then scanned for directories having a
ctime older than --grace-period (defaults to 30m).  Qualifying directories
are deleted under another exclusive lock.

All lock acquisitions are non-blocking with failures being ignored.

Functions like gc status will have the grace period window for retrieving
statuses from inactive containers in either the containers or garbage
dirs, and should access the status files under the protection of a shared
lock.

Examples:

 Container "a983198b-79e3-432e-ad31-f105e96aa003" has recently exited:
   $ bin/rkt gc
   Moving container "a983198b-79e3-432e-ad31-f105e96aa003" to garbage
   $

 Immediate subsequent gc finds nothing to do:
   $ bin/rkt gc
   $

 Immediate subsequent gc force-discard by setting grace period to 0:
   $ bin/rkt gc --grace-period=0
   Garbage collecting container "a983198b-79e3-432e-ad31-f105e96aa003"
   $
pkg/lock: simplify DirLock interface

This moves to a very basic DirLock interface (which represents only an
active lock), and functions to create the respective lock types
(TryExclusiveLock, TrySharedLock, ...) instead of methods.
pkg/lock: add DirLock tests
stage0: propagate lock err directly
Merge pull request #302 from jonboulle/jon-gc

rkt: gc command