title: LUAJ Coerced Java object won't accept LuaValue argument
body: <p>I've come across an issue with LuaJ not accepting an LuaValue as an argument when the Java code specifically asks for an LuaValue.</p>
  
  <pre><code>public void registerEvent(LuaValue id, String event, String priority,
                            LuaValue callback)
  {
      if(!(id instanceof LuaTable))
      {
          throw new RuntimeException("id must be an LuaTable");
      }
      EventDispatcher.addHandler(id, event, priority, callback);
  }
  </code></pre>
  
  <p>Ideally, this would allow the code in Lua to simply read like so...</p>
  
  <pre><code>function main(this)
      this.modName="Some Mod"
      this.lastX = 0
      hg.both.registerEvent(this, "inputcapturedevent", "last", eventRun)
  end
  
  function eventRun(this, event)
      this.lastX += event.getX()
  end
  </code></pre>
  
  <p>Sadly, this simple gives an error that it expects userdata, but got a table.</p>
  
  <pre><code>org.luaj.vm2.LuaError: script:4 bad argument: userdata expected, got table
  </code></pre>
  
  <p>The value of "this" is the same LuaTable in both cases, but because the method registerEvent is added via CoerceJavaToLua.coerce(...) it believes it wants a java Object instead of realising it really wants an LuaVale. </p>
  
  <p>So my question is this. Is there a better way around this that allows me to use the same function from both Java and Lua? And thanks for your time if you read it all the way here :)</p>