Well, I guess i should start out by illuminating the fact that Locke never meant for his writings to be viewed as a philosophical work/system. He was merely writing a political proposal in hopes of persuading the general public to support his friends in the legislature that were very anti-James II. In fact, Locke, at the time of writing the Second Treatise was in political exile in France (from James II). Locke's work was suppose to help bring about a revolution against King James II. The Glorious Revolution finally happened in 1688. That is some background.
The part about the difference between "the state of nature" and a legal government (social contract) are pretty straight forward.
I think the part you quoted was more along the lines of saying that everyone must consent for the social contract to take affect. He was more or less rejected the divine intervention which was heavy at the time due to Filmer.
There are some real discrepancies between Locke's First Treatise, his Second Treatise, and his Essay on Human Understanding.
I could not agree more with this final statement. This is why it is difficult for individuals to reconcile his views and give primacy to certain views over others. Whether or not Locke meant for his Treatises to be taken as philosophy is pretty much a non-issue. Historians of philosophy routinely look into personal correspondence, diary entries, poems, works of prose, etc. to try to reconcile and/or interpret the general philosophical viewpoints of the philosophers they are studying. The fact is, these works were published and they were referred to, whether Locke intended them or not, by the Founders of the US Government; and, these founders had to decide which parts they would give primacy to and which they would reject.
I give primacy to his state of nature sections; however, I do so cautiously because there is nothing definitive which states that his refutation of those rights, once under society, is not meant as philosophy.