I think that the OP is guilty of cherry-picking and is completely ignoring the contribution of religion in the promotion of learning throughout the ages including:
Your claim is pure nonsense, and is simply attempting to avoid the facts.
- The preservation, by Imams of the contents of the great classical libraries
You mean, after the onslaught of radical islam, the burning of the great classical books, etc. The burning, also, of the mathematics invented first by the Moorish world that is evident in their archetecture and civil engineering. Algebra was preserved, not by the action of Islam but by westerners who discovered it. That's sad.
- The foundation of universities throughout the world
And their destruction.
- Supporting the great scientists of the early middle ages (e.g. Bacon)
And then the destruction of their work as the religion radicalized.
- Being the primary source of literate people in the West
See above.
It's only when society advanced sufficiently that "enlightened" poeple could earn a living in the open market that religious organisations stopped being the pre-eminent supporter of science.
I'm sorry, you have presented no evidence to support this claim. There is, however, a humongous pile of evidence showing how the church attempted to cripple or hide science. Even a study of the reactions to Semmelweis are a good example.
Even as late as the 19th century, many prominent scientists and naturalists were also employed by the church.
You presume this was a good thing.
What I beleive you're railing against is the periodic railing of religious organisations against progress.
In history, I'd say the "permanant opposition of churches to progress" would be a better statement. When we look at how religion was perverted by Constantine to support the "divine right of kings", how that idea supported the dark-ages slavery, the opposition to the rise of the middle class, how it's being used now to oppose the middle class, etc, I think it's obvious.
Note, I don't say ALL religious people are like this, but if you look at how Catholicism is working right now, you have a terrible, terrible example. Just look how the Cardinal in the Boston area is behaving. He's using the excuse of the child-abuse lawsuits to close all of the "liberal" churches, even though they have most of the churchgoers, splitting up those churches and sending those people to the most repressive churches he can find. That's one example, yes, but how that relates to Christian principles I simply can't fathom.
This is not universal by any means and does tend to correct itself after a time. This also mirrors general public opinion which swings back and forth on the subject of enlightenment.