An Australian court is being asked to decide whether a transgender woman should be allowed to join a women-only social media platform, in a case that tests the legal definitions of sex and gender.