Handle luacontroller formspec events correctly

Example of problem fixed by this: Edit lua code, press Execute. Now
(execute button has focus), hold down a key. Zillions of "program"
events are generated.
Merge pull request #151 from CiaranG/lua-formspec

Handle luacontroller formspec events correctly