Please excuse the delay in finalizing the new module. I was distracted due to the start of the semester in October last year and then forgot to finish my work.
To summarize, I have finally come to the conclusion not to change the API as theorized in this thread.
First of all, the benefits of making the hamt type non-opaque are too small compared with the possible drawbacks (the non-opaqueness, the inability to return NULL in future API extensions, etc.).
Secondly, after having given it some more thought, the alternative protocol (which we have called more robust) seems to be harder to understand because "p != e" could then mean two different things. So I will leave the original protocol in place, which is easy to comprehend: If "old_hamt == new_hamt", no insertion has taken place and one has manually free the element one has attempted to insert. If "old_hamt != new_hamt" the element has been inserted and has now to eventually free "new_hamt" besides "old_hamt".
After I have rebased my code to HEAD, I will commit the new module to Gnulib.
Thank you for your patience.
Marc