States and local governments spend hundreds of billions to boost economic activity. A startup boom is reshaping how it's done.