common/quota: move _qsetup() helper to common code