Ticket1326 logpdf fails for beta and gamma

This PR fixes the three cornercases where 0*log(0) wrongfully was nan but should be:
 stats.gamma.logpdf(0,1)==  0
 stats.beta.logpdf(0,1,0.5)==-0.69314718056
 stats.beta.logpdf(0,0.5,1)==inf

See Ticket #1326
http://projects.scipy.org/scipy/ticket/1326