Closed-loop electron-beam-induced spectroscopy and nanofabrication around individual quantum emitters