Fix issue when private struct snes_ctx is deleted.
  -- The f_tmp variable needed to be set to NULL when constructed otherwise it segfaults when destroyed
Fix VERY sloppy casting of void pointer to local variable
Merge branch 'johanhake/fix-issue-417'