[libyaml] Fix bunch of security vulnerabilities

unrelated: wow, this is ugly.