HBase sharded queue implementation.

Manual pick and merge from d5c65ab39411d0dd295e583683a8d87787da68bc