Add /stats endpoint

add shard.Stat()
add /stats endpoint
add shard_test
fix racy test
Merge pull request #168 from mkobetic/add_stats_predupsort

Add stats predupsort