Add git hooks to generate tags automatically.

Thanks, @lucapette.