A council has faced criticism for refusing to remove David Walliams’ books from libraries after a probe into allegations of sexual misconduct.