Large cities that bar legalized recreational marijuana shops create a windfall for small nearby towns that gleefully welcome dispensaries.