Add a mem3:range/1 function

This will return the range from a #shard{} record or decode it from a
shard dbname. Throws badarg on failure.