Proper Audio/Video Dumping

Screwed up the previous PR, replacing with new PR

Old notes: https://github.com/dolphin-emu/dolphin/pull/1183
@neobrain From the testing I've done so far, it has no issues with savestates, restarting emulation, etc.