maint: Rename lib to libtemplate. Add autotools tests by make check.