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.
Merge pull request #1 from ivarne/patch-1

Improve type stability of incompletebeta