People living near windfarms will be able to invest in and own as much as a quarter of new projects.