Where does the publisher send the royalty check? To the author, or to
the new copyright owner?
To the new owner, as soon as the publisher is informed of the change in ownership of the copyright.
If the published sends to check to the author because the published hasn't yet been informed of the transfer (usually something that only happens once or twice until it is cleared up), the author has to hold the funds received in a constructive trust for the new copyright owner and pay them over to the new copyright owner promptly.
Does the publisher's contractual obligation flow to the individual
person (the author) who signed the publishing contract, or does it
flow to the owner of the copyright, whoever that may be? If the first
is true, then a separate transfer of contractual obligations would
presumably be needed to vest the third party with all rights. But if
the second is true, then the shift of royalties (obligations) would be
The contract of sale would make this fine distinction irrelevant 99% of the time anyway by expressly providing for an assignment of all contracts licensing the copyright, but this assignment would very likely be implied in law even if the transfer of copyright contract was very poorly drafted and omitted this provision (unless the contract expressly provided for some other disposition of the license fees which would be extremely unlikely since it defeats the point of transferring the copyright anyway, except for a possible reservation of a final payment covering some time period before and after the transfer for administrative expediency - for example, I have some works for which I earn royalties of about $25 every four months, and it wouldn't be worth the trouble to split the transition period check if I sold my copyrights in those works).
In the normal case, the author still owns the copyright when he dies,
at which point the heirs succeed to the author's rights under the
publishing contract. No problem. But if the copyright ownership has
been transferred to a third party during author's lifetime, does that
third party have any claim to the royalties going forward?
If the copyright has been sold to a third-party during life then this intellectual property isn't part of the estate of the author and doesn't pass to the author's heirs, just like any other property that someone transfers during life. The heirs have no claim to the royalties going forward.
In non-U.S. jurisdictions, there are two separate kinds of rights associated with copyright. A transferrable economic right that can be transferred to third-parties and works as explained above, and separate noneconomic rights called "moral rights" that are non-transferrable. As explained at that U.S. government link discussing the possibility of amending U.S. law to provide for moral rights:
Chief among these rights are the right of an author to be credited as
the author of their work (the right of attribution) and the right to
prevent prejudicial distortions of the work (the right of integrity).
U.S. practice, rather than treating moral rights as something legally enforceable, treats moral rights as a question of academic ethics and industry custom (sometimes further implemented in the performing arts by collective bargaining agreements between industry-wide labor unions of people in professions who are legally "authors" in countries with a moral rights regime, and associations of the people who hire them).
I am not familiar with the law governing moral rights after an author's death because U.S. copyright law doesn't give rise to moral rights, so I've never had occasion to deal with the issue.