The National Association of Head Teachers (NAHT) is to consult members on the possibility of moving to industrial action after its bid to bring a legal challenge against Ofsted was thrown out.