When the mayor of a small town in western Japan announced she was taking maternity leave, she expected some raised eyebrows.