Implement 'frame stretching' for netplay

There was also a bunch of refactoring done that mostly ended up being
incidental, but I left it in because it was mostly an improvement.