Marshmallow, the British insurance unicorn, is close to finalising a new capital injection valuing it at more than £1.5bn, despite the difficult funding environment facing many technology companies.