Insurtech unicorn Marshmallow has revealed that it is close to turning a profit after its losses shrunk by 98.7%.