Protesters fought running battles with police, torched vehicles and looted shops in Dublin, after three young children were injured in a knife attack outside a school.