Don't trigger an "off" event to itself when luacontroller turns a port off

I hope this doesn't break anyone's setup.
Rewrite Logic Gates: Makes it super-easy to add new gates and cleans up code

Fix bugs in the Luacontroller (when placing, false input pin values were given) and fix variables
leaking into the global environment in pistons.
Merge branch 'master' of https://github.com/Jeija/minetest-mod-mesecons

Conflicts:
	mesecons_luacontroller/init.lua