I'm gonna say it straight. You are going to need help. I worked for years with emotionally disturbed teen boys. It is really, really hard for people to break patterns, establish new rules, etc. And if you yourselves don't have a particularly healthy past, it is even harder because there is often a steep learning curve and everything goes through your own personal filter first (your story about your brother leaving with a bottle of alcohol and how that made you scared Z left with a bottle of alcohol is a perfect example... you didn't just react to Z, you reacted to your own past), so often the experience is the parents have a lot to work on themselves as well. So, HE is going to need help and support and YOU (all the adults) are going to need it as well. All the family skeletons are going to come out, along with a whole pile of teenage boy stuff. He's going to end up hauling out to air all of your most painful memories. Not because he's trying to hurt you necessarily, but because... He'll push your buttons, he'll call his father out on the things he feels wronged by, he'll go for broke. And it ends up really hurting. If you (adults) are not prepared and have resources to turn to personally, it has the potential to be bad for everyone.
I also caution you to see this as a marathon, not a sprint. You will not be able to make these massive changes in his behavior overnight. Therefore, it is really helpful to understand that every "I'm locking myself in my room!" or storming out of the house or whatever is not (necessarily) cause to panic. It is one bump. And, on the flip side, 2 days of "good behavior" is also not reason to think all is well. The scale of 2 weeks here and there is a drop in the bucket. Try not to get tied up in a "list of things to do" or look at each thing he does as a sign. We would say that it took at least a solid month before anything really started coming up. Often there is a crazy transition period of a week or two when moves or big changes in care happen and they will do all sorts of extreme things- run away, whatever. Then, once they see the change is real, there is a "honeymoon" when the child is trying to figure out which end is up and is generally quiet and well behaved. Then, things get rocky again as they test the waters at about a month. About 4-6 months later, when routines are set and things feel settled and they understand that they are safe, they have a major bloodletting when the real work starts as they kind of fall apart in order to be put back together.
Rules are important, but is is way more important that the child sees the rules for what they are- your role as parents to care for and protect him. Often troubled kids WANT rules, even though they will resist them. This is because rules say "I care what you do and what happens to you and I am willing to do what it takes to keep you safe and on the right path." But if this is not clear and the rules appear over bearing and punative or without understanding, the whole thing backfires. I would work out the rules WITH him. He KNOWS what he should not be doing. Get HIM to talk about that. Also know that these rules will be broken. Not if... when. So have a reasonable plan in place for that.
My other bit of advice is- don't listen to his WORDS so much. "I want to go out (even though I am in a strange city and have swine flu)" may mean "I feel trapped". Often kids will push away from those trying hard to bring them in because they are afraid of themselves, of what will happen. "I want to be with my friends on Christmas" may mean "I need you to make me come even if I say I don't want to so that you prove that I am wanted and family is important". It is hard, but you will need to hear his words, then actually think if this is really what he is trying to say. Often troubled kids will say they "want" something, when really, they are looking for the opposite. It is about forcing you to show committment, protecting them (from themselves sometimes), and filling needs they don't want to admit (to themselves) that they have.
In all my years, I firmly believe it takes ONE. One single adult who really, really cares. It may not prevent them from doing all this "bad stuff". That adult may love them but not have the tools to "save" them all by themselves and may need lots of other people to do that. It is still a hard road. But with ONE, there is hope because there is a lifeline. And that child will know it, even through the dark days. You guys have the potential to be THE ONE. But it is often a job that does not recieve thanks for many years and is very hard to endure.
Work out a situation where this kid is not being shuttled back and forth and keep him where he can get some stability. Get some established professional support and counseling. Then take one step at a time.