A circuit-generated quantum subspace algorithm for the variational quantum eigensolver