Xbow: S6, +50% vs melee, 1 FS. So effective S9 +1FS vs mace, somehing like 70-80% win probability I guess.
Mace: 50% win probability.
Agg mace is almost as good as xbow, and protective xbow blows mace out of the equation.
xbow is also cheaper (60 vs 70 hammers), and works as well as mace against any other melee unit. Generally xbow is better for stack defense (combined with anti-mounted defender), except against sieges - there raw strength (which mace has more of) is better.
I can't see how mace would be equal to xbow when it comes to anti-melee duty. Mace is a general purpose unit, has a bit higher base strength, and different promotion path (CR being the common mace-duty).
As I said, every unit has a place.
Why don't I build Ironclads? Because I don't seem to need frigate-busting net-protectors (only time an ironclad is reasonably fast is when it's built by Ragnar after winning circumnavigation bonus). If however you find yourself in post-astronomy pre-combustion naval war, you might want some to keep your nets up.
Why don't I build HAs? Because HBR is an expensive tech and I have other research goals. I might go for HBR if I have ivory and want stables to boost my elephants - then again I might research it when I get guilds and wonder why I can't build knights.. But if I don't have ivory or metals, then .. then I go for cats and longbows. Except if I'm playing Carthage
