Doubly resonant second-harmonic generation of a vortex beam from a bound state in the continuum