Yep, you have outlined the problems with grants. As they look forward, and due so in a one-time lump sum, they hold considerable risk, and thus the providers of the grant money need to ensure they pick correctly, but this just leaves us with a centrally controlled economy and bureaucratic nightmare.
Instead, you should seek to discover the intrinsic value as it is occurring, and therefore no risk to the granters. I believe it is possible to do so through a modified Vickrey auction. A Vickrey auction is one in which the winners pays the price the second place bidder placed. In this modified system, the top 90%(or some other optimizing number we can work out) of bidders win, and they all pay the price of the highest non-winner. A certain subset users of the Open Source software are asked to give their true value for some sub-set of open source products as they use it and using statistics we could extrapolate that to the rest of the population.
We would then use these weights to give away all grant money. This might mean that Firefox can be funded exclusively through this pot, and they would no longer be beholden to Google for default Search. It would mean the grant writing process would go away. It would mean, as ads make products less valuable, that ads go away.