Describe changing scenes in the Howto document

This documentation not only provides information to users on how to
change scenes in LNVL, but it also serves as the design document for
how we will implement support for changing scenes, at least in terms
of the DSL that the engine provides.
Add a global, current scene property to LNVL

This patch adds a property to the LNVL table which represents the
current scene in use.  That way the rest of the modules have easy
access to the current scene if necessary.  The patch also provides a
function to change the scene for use in user-written LNVL scripts.
Update the main example code to use LNVL.currentScene

This eliminates the old ‘scene’ variable in favor of the globally
available current scene that LNVL provides access to.
Add an example script to demonstrate and test changing scenes
Document the opcode and instruction for changing scenes
Register ‘change-scene’ as a valid opcode
Modify LNVL.changeToScene() to return the ‘change-scene’ opcode

We make this change so that we can call the function within the
arguments to the Scene constructor, since anything we call there must
return an opcode for future execution instead of immediate execution;
if we changed the scene immediately it would screw up the flow of the
script.  In order to do this we must also move the definition of the
function down in the file, after all of the require() calls so that we
have access to the Opcode class.
Remove the call to LNVL.changeToScene() from the main code

We can load the initial scene by assigning it directly to the
LNVL.currentScene property.  Calling changeToScene() is not longer
effective in this case since it returns an opcode, which does not have
the immediate effect we want.
Register ‘set-scene’ as a valid instruction
Implement the ‘set-scene’ instruction
Fix bug when finding scenes for the ‘set-scene’ instruction

When calling changeToScene() we look for the given scene name in the
global environment.  This fails if the scene we want to switch to is
not yet defined, meaning it is not accessible globally.  To fix this
we need to delay the lookup until we actually run the ‘set-scene’
instruction.  This patch changes changeToScene() to return a
‘change-scene’ opcode that contains only the name of the scene to use,
not the Scene object itself; that would still be too early to lookup
the desired scene because we create opcodes before we finish loading
all scenes from a script.  That is why we have to wait all the way
until we run ‘set-scene’ to perform the lookup, because by then every
scene will actually be available.
Convert ‘change-scene’ opcodes into ‘set-scene’ instructions
Fix a bug in ‘set-scene’ caused by conflict argument properties

When convert opcodes into instructions inside of the method
Scene:drawCurrentContent().  Before calling the instruction we always
add a ‘scene’ property to the arguments we give to the instruction
because it is useful to them.  However, the current definition of the
‘change-scene’ opcode uses its own ‘scene’ property.  LNVL overwrites
this property with an LNVL.Scene object, which causes the ‘set-scene’
instruction to fail.  That is because ‘set-scene’ tries to lookup the
scene in the global environment, assuming that ‘arguments.scene’ is a
string.  But this is not the case.

We fix this by renaming the ‘scene’ property in the ‘change-scene’
opcode to ‘name’.  Then the ‘set-scene’ instruction is able to look
for that scene by name.  With this patch in place we can run the ‘08’
example script with expected results.
Update the Hotwo with a notes on ‘scene’ properties in ‘arguments’
Merge branch 'global-scene-control'

* global-scene-control:
  Update the Hotwo with a notes on ‘scene’ properties in ‘arguments’
  Fix a bug in ‘set-scene’ caused by conflict argument properties
  Convert ‘change-scene’ opcodes into ‘set-scene’ instructions
  Fix bug when finding scenes for the ‘set-scene’ instruction
  Implement the ‘set-scene’ instruction
  Register ‘set-scene’ as a valid instruction
  Remove the call to LNVL.changeToScene() from the main code
  Modify LNVL.changeToScene() to return the ‘change-scene’ opcode
  Register ‘change-scene’ as a valid opcode
  Document the opcode and instruction for changing scenes
  Add an example script to demonstrate and test changing scenes
  Update the main example code to use LNVL.currentScene
  Add a global, current scene property to LNVL
  Describe changing scenes in the Howto document