add unit tests
update some comments; do not use variables on prototype
add test cases for waitRule and dialog
Merge pull request #12 from node-webot/test

add unit tests