SLA for services

This change adds SLA functionality for services configured in Selena. This new functionality takes service history of each active service and counts SLA. Calculated SLA is stored in DB for every day. The data are displayed on a front page. There are 3 information available: SLA for 7 days, 1 month and 3 months. 
can you try to avoid using custom SQL queries and just use the models instead and operate on them?