As a preparation for the removal of the ViewEngine parts in `compiler-cli`, this commit moves the version number helper functions up one level such that the whole `diagnostics` subfolder can be removed. PR Close #44269