As a part B to this question, what considerations would need to be taken to write such a tool?
Family Historian seems to handle this well. I have no experience of other software packages, but would think this was a basic facility in most software as "non-traditional" relations are very common throughout history. To your list I'd add many of the newer aspects of modern life: unmarried but committed couples, same-sex couples and gender re-assignment.
In response to Part B:
The software tool needs to be extensible to enable users to respond to changing societal circumstances or genealogical practices.
For example; if the program has a category of data called "Relationships" and offers suggested labels for instances such as Married, Civil union, De facto etc, then it should also allow the user to add to that list of suggestions. There may not be too much demand for the relationship label "IVF gamete donor" but the few people who need it should be able to add it in.
GRAMPS is one example of a package that does this fairly well. Most drop-down lists include a label "other" or "unknown" than can be over-written to suit particular circumstances. (It has a fixed view of gender, however.)
In addition, if the software is Open Source, then there will be a mechanism for (groups of) end-users to modify the underlying code to make their extensions available to others and to advocate for global changes to the codebase.
As noted in other answers, any attempt to build a tool with the comprehensive list of non-traditional relationships is doomed to failure. The day after you release it, someone will suggest another variation.
There are two program which realize features you requested. They are GRAMPS (it was mentioned in a previous answer) to What software can reliably store and manage non-linear (eg non-blood or remarried) relatives? and GenoPro. A small word regarding GenoPro. It is very powerful program with evaulation period (so you can test it before buy) with the extensive support wide range of relations between persons (not only blood relation, but emotional, work and so on).
You may try and choose what program better suites your demands.