CRM-13878 fix

The patch provided in the issue is a good attempt to fix it, but provided a different solution after a bit of inspection:

The bug was <code>civicrm_contribution</code> table was not getting included in the from() clause function, the reason was, query building mechanism didn't consisted of table inclusion code for contribution table while contributon_note was included in the SELECT clause.

The fix: added inclusion.