Please tag 0.14.
This is built on #9589 -- the last 3 commits here are new.
The first fix is a minor one, which is to correctly calculate the maximum size of the replacement transaction, which is used to calculate the fee to put on the transaction. The old algorithm (of adding 1 byte per input) is actually not always conservative enough, for instance in situations where you get "lucky" and the original transaction has very short signatures. I managed to encounter such a transaction during testing of #9589, and it was a difficult-to-debug problem, so I thought we should fix.
The second fix is a more important bugfix, which is that if the replacement transaction failed to enter the mempool (#9589 makes this much less likely to happen, fortunately), then we'd throw an RPC error even though the new transaction has been recorded in the wallet (and not mark the original tx as having been replaced). This is similar to the bug we fixed in #9302 -- we should always return the new txid to the user once we've generated it, as throwing an error implies the operation failed. The approach I took was to aggregate the errors in a single JSON object and return it, similar to what we do in some other RPCs.