fix bug with enabling segments and improve replication logic
Merge branch 'master' of github.com:metamx/druid