Adds suitable indexes

Adds appropriate indexes to jobs and schedules to improve performance.
related to #RM1854
https://redmine.ohthree.com/issues/1854
Merge pull request #276 from amalaba/add_index

Adds suitable indexes