Added watchpoint handling in scripting.

This also involved improving current watchpoint support and fixing a bug where having multiple watchpoints run simultaneously would not work correctly.