Minor tweak: std::set.insert() doesn't need to be checked for existence beforehand
Allow ROM rewinding to be disabled via advanced settings.

<advancedsettings>
  <games>
    <enablerewind>true</enablerewind> <!-- Default -->
  </games>
</advancedsettings>
SaveState refactoring - new class, CSerialState, that takes care of managing the rewind buffer
Implemented smooth rewind and touched up some code

Commit also contains quite a few cosmetics, sorry for not separating