Move declaration of i in mem.c so it never will be unused

And remove the confusing 'i = i' warning silencer.
Part of Ticket #69