refactor DmaManager_reference a bit (in anticipation of portalmem changes)