choosers/weighted: generic weighted shard chooser

Fixes #2