Managed to put Puzzle Mode into Lua. Defined a set of needed callbacks that Lua side can implement. Experiment this on single player mode (though it is still called 'init_puzzle' for now, but it actually contains all single player submodes, however there are still Puzzle Mode specific things like one_shot stuff and a way to make sure a Puzzle is started. Other submodes won't need those.
changed init_puzzle() calling to reflect API change
added some comments