Added the *Mainloop.Stop() function, to terminate the mainloop.

Also, changed from line-style comments, to block-style comments for the
function documentation.