When our unicorn left us, I think it hurt more than any other breakup I've had.
Now, our situation was a little different - she left because she was afraid her presence was going to drive my wife and I apart (despite the fact that it was a drama-free relationship, and I'm pretty sure we were even stronger as a triad). She still comes around from time to time to throw huge amounts of UST at the both of us, and I'm pretty sure she still loves us both (I know I'm not over her, may never be) but just refuses to actually be with us. I'm not sure which is worse though.
To me, it sounds more like you were stable as a 2+1 with her living elsewhere, but when you attempted to fully integrate as a true 3 with her moving in, that's when your conflicts arose. I suspect, after reading through your description, that you had some serious communication issues going on here, which probably led to your relationship's downfall. Here's the issues I see:
1. I can't tell if it's your writing style or the way things actually were, but from some of the stuff you said I pick up a very strong "us versus her" mentality running through everything. That's probably amplified by the fact that she's no longer with you, but I suspect it was probably there the entire time, and may have been an additional stressor. When she was external to the relationship (like I said, a 2+1 instead of a 3) it wasn't a big deal - even natural - but once you moved her in and attempted to fully integrate her with your relationship, that's where it sounds like the wheels fell off. You yourself said you weren't really "ready" for that step, and that was probably a good instinct, even though the situation forced your hand.
Maybe she was more comfortable being external, where she wasn't really in a fully committed relationship, and once she moved in the pressure of having commitments was too much for her, causing her to shut down. Maybe it was just easier for her to play at being your unicorn than to actually be a full member of a triad. Maybe you guys yourselves weren't ready for the rebalancing that came with a full third member of your relationship. I dunno... but I'd guess that's the critical breaking point there.
2. Communication issues. Like I said before, I think you've got some. Part of it (again) may be that you weren't used to the full triad dynamic, but it doesn't sound like you communicated with her like she was an equal party in the relationship. If your husband had done half the things she had done, you presumably wouldn't have let him get away with it, or if you had you probably wouldn't have let it at least go unspoken. Relationships aren't killed by the things you say, they're killed by the things you mean to say but don't.
3. Openness and trust issues. Now, I'm in an open marriage, so my situation is probably a bit different than yours, but I'm wondering if - coupled with the communication issues above - this isn't a factor too. You knew that your friend was maybe up to something online but didn't talk to her about it... you talked to your husband about it, but not the person in the relationship that might actually be doing something bad. You said that you let it go because you had agreed that your husband would be the only man involved - but did she agree to that too? Was that ever her idea? If she had come to you guys and said "Hey, I know what we said, but I met somebody... would you mind if he and I occasionally..." how would you have reacted? Was your relationship comfortable enough she could've felt secure enough to even ask that? These are things to consider.
4. The crazy. Finally, it sounds like your Unicorn may have just been crazy. I've found, from speaking to others who've had similar experiences, that the more likely a person is to want to fill the role of the unicorn, the more likely they are to be... how can I put this nicely... damaged. Abuse, self esteem issues, difficulties forming and keeping relationships, personality disorders, bipolarity, substance abuse, and sometimes just plain old "being nuts" - all of these seem to pop up from time to time. Now, there's nothing wrong with them, I'm not judging.
Our unicorn had been abused as a child and was working through some issues - she couldn't hold on to a stable relationship herself, and that's why joining us worked (for a while) - having two other people to balance out the relationship meant that if she wasn't feeling particularly girlfriendy on a specific day she didn't leave anybody in the lurch. We all got different things from one another, and her role had to fluctuate, there was enough love and stability to allow for compensation, while in a normal relationship it put incredible stress on whoever she was with trying to keep up with the ebb and flow.
Dr. Drew always used to say on loveline that people who come from chaos try, often unintentionally, to seek out or cause chaos in their relationships because it's what they're used to. You said she had a child, was living with someone else (and was kicked out), on food stamps, unemployed... not a bastion of stability, by the sounds of it.
The appeal of joining an already stable relationship may have been added to by the potential for chaos and drama that those subconscious parts of her brain were seeking out, and while she was external to the relationship it was probably enough, but once she did move in and became an equal, that self-destructive mechanism inside her started kicking over again rebelling against the status quo, leading to the online affair and eventual sabotage of your collective relationships.
Straight poly guy in an open marriage to a very special bi poly lady. We miss our unicorn, and really need to make some better friends.