Added ajax interface

All ajax requests from a webapp can now be handled directly by lua. This
way one can use existing webpages as the app frontend without the need
to modify them.
print direct

print don't waits until the end of the script any more.