Took the words right out of my mouth. In fact, you could equally ask: "what is gender anyway and does it really matter in a virtual world that does not rely on sexual reproduction to maintain its population?". Or, to put it another way, does not the answer to questions about avatar gender depend on why you are asking? What is it that you actually want to know?
Answer that last question and, I suggest, the 'gender detection problem' becomes far more tractable — no longer about gender as such; just a matter of ticking boxes in a purpose-specific truth table.
Which is why, for the record, when friends asked me to code them a 'female only' doorway, body-shape was only one of the parameters on their wish-list. For the rest — mostly relating to what the avatar has between its legs — I gather they are now resigned to relying on old-fashioned, personal, physical inspection.
It's a hard life!