An industry-wide code of behaviour to prevent sexual harassment and abuse in theatres is being drawn up by Royal Court artistic director