Build: bumplibs: overhaul library version updater
Use shell programming best practices (quoting, etc.), functionize where useful,
update configured headers (which had gotten out of date with actual practice),
add more comments, and don't bother saving backups of sed input (since they're
version-controlled).