parser.c: shrink the input buffer when appropriate

Fixes GNOME/libxml2#200

Also see discussions at:
- GNOME/libxml2#192
- nwellnhof/libxml2@99bda1e1
- https://github.com/sparklemotion/nokogiri/issues/2132
12 jobs for flavorjones-fix-missing-buffer-shrink in 9 minutes and 2 seconds (queued for 1 second)
latest