Unions launch joint legal action following law change allowing agency workers to cover teachers on strike