Here an article on how they got those cool shots. They did them with as little post shoot editing and kept things in camera as possible. Melissa was actually wrapped in chains that has some links cut and held together with magnets. Then on a count she busted out. Caity Lotz actually punched some sugar glass.
It's one of the oldest Hollywood tricks in the book. The "glass" is really a sugar/water/corn syrup/cream of tartar mixture made to give the illusion of glass...not just for windows, but mirrors (the 7 years bad luck rule does not apply...I think), bottles of wine, and so on. It's so there is very little to no hurt at all to the actors or stunt people.
It's also called candy glass, edible glass, and breakaway glass.