Generating specialized cell types by asymmetric division in Bacillus subtilis