GHA/linux: fix 'mbedtls' internal name confusion
`mbedtls-arm` and `mbedtls-prev` were matching `contains()` expressions
looking for `mbedtls`. It caused an unnecessary cache restore and an
redundant mbedtls build on bumps, and made the build flavors require
different local directory names to avoid this accidental collision.
Also drop `-threadsafe` from internal names. All local builds are.
Follow-up to
88060353440df4e1b7167c180b39074fd2ab457a #20240
Follow-up to
3a305831d1a9d10b2bfd4fa3939ed41275fee7f7 #19077
Closes #20248