Improve type stability of incompletebeta

I saw this repo on julia-stats, and found this potential problem while reading code, searching for obvious performance problems. I have not tested anything, but it is easier to describe a suggestion in a PR than in a mailing list post.

PS: Not sure what Github did with the last line.