Hello Reza,
You are right, there is currently no functionality for this. Usually this is not a problem, because the Customer is tied to a User account which must have an unique email address. Duplicate customer records are usually created only if the Customer selects anonymous checkout as guest, in which case the Customer records are separated on purpose.
The best place to merge the Customer with code is before the Order is submitted, for example in method FinalizeCheckout of class CMSCheckoutWebPart. If you detect the Customer is new, and has no ID, you can do a look-up of existing Customers based on the submitted email address, and substitute the Customer if you find a match.