The meaning here is equivalent to:
All for one and one for all
All the members of a group support each of the individual members, and
the individual members pledge to support the group.
The best known motto of the title characters in the book The
Three Musketeers, by the nineteenth-century French author Alexandre
The Latin phrase: Unus pro omnibus, omnes pro uno
Unus pro omnibus, omnes pro uno is a Latin phrase that means:
"One for all, all for one" in English. -- Wikipedia
The Wikipedia article gives an example of usage:
"As they also absolutely intended to proceed with the execution
against us...regardless of any loss of life and limb, honor and
property, we would stand firm, with all for one and one for all..."
The basic meaning is that the members of the group are united, and stand together.
Which is reflected in the first example you cited:
...mother and I and Peggotty were all in all to one another and there was no one to come between us
Your second example, quoting a Nirvana song, takes the idea one step further:
All in all is all we are
With the addition of the idea that this union is all there is. Meaning that individually there could be no separate existence (said for poetic effect in the song).