I thought a security guard has the power to do this. Otherwise, what good are they!
WalMart (or any other store) is private property and their security officers are there to ensure the safety of their customers and their merchandise. I think if they detain you without just cause, you could probably have a case against them for violation of your 4th amendment rights, but considering the number of witnesses who heard/saw this lady being verbally abusive, I don't think she'd have a snowflake's chance in the eternal bonfire of pulling that one.
Where I work, security can and does detain people all the time. They can hold them until the police show up if they are to be arrested, or they can remove them from the premises if they are just "behaving badly" so to speak without actually breaking a law. I assume (the deadly assume - so I could be wrong) that all security guards had this power. My thoughts are that this lady falls into the "bad behavior" catagory, so they didn't call the cops, just made sure she didn't harm the OP.