The possessive 's comes from the masculine genitive case ending on -es in Old English. This means that you could say "of [the] man" by simply sticking -es after "man". The genitive case was often used to indicate the possessor of something. In German, the genitive case is still used, and it ends on -(e)s for masculine and neuter singular words: the man = der Mann; the man's house = des Mannes Haus. As you see, the genitive is also used with articles.
The s in which most possessive pronouns end comes from the same genitive ending, either directly or indirectly by analogy. The genitives his, whos and yours (plural) already existed in Middle English.1 It is conceivable that modern hers, for example, which was something like her in Middle English, was formed by analogy with the possessive pronoun his, or by simply attaching the possessive s to it, if that already functioned as a productive suffix. Note that the apostrophe is of later date than the possessive s: the possessive of summer was simply summers in the time of Shakespeare.2
Professor David Crystal explains it in his book The Fight for English: How language pundits ate, shot, and left (Crystal 2006), pp. 134-135:
Its is just as possessive as cat's, but it doesn't have an apostrophe. Why not? Because the printers and grammarians [of the nineteenth century - Alex B.] never thought the matter through [emphasis mine - Alex B.]. They applied their rule to nouns and forgot about pronouns, thus creating an exception (along with the food is hers, ours, yours, theirs) without realizing it. And even if they had noticed, they wouldn't have done anything about it, for it's was already taken, as it were, as the abbreviation of it is.
I highly recommend this book to anyone interested in languages.
Charles Fries (Fries 1927) speculates that it could also be so because "their plural forms do not end in s" (cf. one - one's - ones or other - other's - others, ft. 7)
For an excellent summary of how the rules concerning apostrophe use developed, see
Sklar, E. (1976). The Possessive Apostrophe: The Development and Decline of a Crooked Mark. College English, 38(2), 175-183. doi:10.2307/376342
If you want to learn more about how the grammarians of the past arbitrarily imposed their confusing rules - and didn't stick to them - see pages 197-198 in Doctrine of correctness in English usage, 1700-1800 by S.A. Leonard (Leonard 1962); for instance, Joseph Priestly argued in The rudiments of English grammar, which was published in 1772, the following (pp. 86-87):
On the other hand, in the same book, on page 11, he lists all the possessive pronouns without an apostrophe and he treats its separately, as the genitive form:
Thirteen years later, J. Mennye in An English grammar ; being a compilation from the works of such grammarians as have acquired the approbation of the public [...] argued diametrically the opposite of the convention earlier proposed by Joseph Priestly.
But in 1823, T.O. Churchill says the following in A New Grammar of the English Language:
Best Answer
Everybody's, everyone's, somebody's, someone's, anybody's, anyone's, nobody's, no one's.
EDIT:
And also the reciprocal pronouns: each other's, one another's.