Observation of enhanced spontaneous and stimulated emission of GaAs/AlGaAs nanowire via the Purcell effect