Add refcount extension

Add refcount extension to store image references and cleanup orphans.
Based heavily on @wking's work in
https://github.com/docker/docker-registry/pull/409 - this is just an
adaptation to extension format.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>