Performing virginity and testing chastity in the Middle Ages