At least in my field, papers cost roughly $50k-$100k for just the researcher salary and overhead. Paying $2k to get a paper published is not a high hurdle (especially once the norm of closed-access publishing fades away). And this really seems like the minimum cost that needs to be incurred in order to get decent copyediting and the editorial cost of co-ordinating the referees. I love the ArXiv, but if I can get a the copyedited version from the journal I will.
Yes the referees aren't paid, which may or may not change, but paying a PhD editor $500 to figure out the best referees and engage in the back-and-forth with them and the authors is pretty minimal. So $2k for a professionally edited, polished paper which is then free to everyone forever seems like a pretty good deal, and essentially a non-issue.
Your point about the need for incentives for scientists to share non-paper scientific output like code is well-taken (and well-known). But I don't see why this can't be solved by open-access journals. I am completely unconvinced that facebook likes controlled by a for-profit organization are the way to go.
EDIT: By the way, you've mentioned in several places the 12-month time lag for publishing. This was solved for the physics community by the ArXiv; the papers get immediately released, and you can still submit to journals for the benefits of copyediting and refereeing. (Afterwards the ArXiv version is updated.) I don't know of any reason it can't work for all of academia.