[TableGen][NFC] Refactor/deduplicate emitAction. (#137434)
Currently there is a fair amount of code duplication in various parts of
emitAction. This patch factors out commonality among CCAssignToReg,
CCAssignToRegAndStack, CCAssignToRegWithShadow, and CCAssignToStack.
`XXXGenCallingConv.inc` are identical before and after this patch for
all targets.