Backported logsumexp from sklearn.utils to fix travis version issue.