Autogen: AUTOMOC support for files with the same name but different extensions

This adds support for AUTOMOC to moc header files with the same but different
extensions (e.g `obj.h`, `obj.hpp`, `obj.hxx`).  If a moc file would appear
multiple times in `mocs_compilation.cpp`, a number suffix is appended
to the name to make it unique.

Closes #14489
13 jobs for autogen_same_name_different_extension
Status Job ID Name Coverage
  External
passed cdash

running cmake-dash3win7-windows-release-ninja

4698:57:00

passed cmake-hythloth-linux-debug-makefiles+sphinx

00:54:57

passed cmake-hythloth-linux-release-lint-iwyu-tidy

00:02:21

passed cmake-moonshade-osx-debug-ninja

00:11:00

failed cmake-moonshade-osx-release-makefiles

00:13:07

passed cmake-terfin-windows-release-vs2017

00:46:12

passed ghostflow-check-master

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager