Guest permission cleanup (fixes #906)

This commit reorganizes the array of illegal guest permissions (now in alphabetical order to make it easier to read), fixes a few bugs and changes the upgrader to remove any permissions guests can't have now that they could have in earlier versions, to prevent any possible issues which that might cause.

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>