Scheduler: Check and increase max_execution_time if its too low

Related to #928
Scheduler: Add locking mechanism base on using mysql

Prevent multiple schedulers running at once. We create a fake
locking mechanism based on setting a flag in the settings table.

Related to #928
Optimize cleanup scheduler to only load image media type
Fix /reports date filter: make 'All Time' filter work #91

Basically this just allows empty values for the from and to fields.
Allow date filters with only 'from' or 'to' value, not both

* Allow just 1 of from or to filters, don't require both.
* Check filter params are not empty, not just if they're set
  Avoids defaulting to filter by 1970-01-01
small edit to the FrontlineSMS admin view to update it for the 2.2 version #1034 #1053
Site banner setting: accept jpeg and add error message. Closes #579

* Accept .jpeg too
* Add error message translation
Merge pull request #1020 from rjmackay/date-filter-fixes

Date filter fixes from uchaguzi
Merge pull request #1017 from rjmackay/scheduler-locking

Scheduler Improvements
Fix check for message media: avoid showing unneeded 'preview message'. Closes #798

* Message media check was always true. Fix to check media count
* No preview message only shows when there is something to preview.