add a "__tostring" method for boost functions

It makes it easier to realize that they are functions when in the
console.
clean up some comments, improve type-safety in lua boost function