migrate: Clarify code and fix logic

!RESStorage.getItem('RES.firstRun.4.3.2.1') && -1 will either return
false or -1, never null, so the null case would never be run.
Switching to the use of 0 for the case allows us to consistently use
integers.
migrate: Simply with a conditional operator
migrate: Replace comment with variable
migrate: Refactor code into getOptionsVersion
Merge pull request #1381 from mc10/migrate

migrate: Clarify code and fix logic