CRM-12623, improvements w.r.t custom table joins and notice fixes

----------------------------------------
* CRM-12623: Create CiviHR Report Template
  http://issues.civicrm.org/jira/browse/CRM-12623
Merge pull request #952 from deepak-srivastava/hr

CRM-12623, improvements w.r.t custom table joins and notice fixes