dlltool templates

This allows generation of a tool which handles database update (and optionally partial cleanup).