Code cleanup - Refactor utils.get_services()

Clean up utils.get_services.

This requires latest pynag.
Refactor and code clean up in adagios.status.utils

The code cleanup is not done yet, there is still a big mess but situation is better now.

* Refactor get_services()
* Refactor get_hosts()
* Use constants instead of magic strings wherever possible
* Add a bunch of unit tests for the refactored functions
* Taking advantage of latest LivestatusQuery (so update pynag)
Advanced Search Dialog for adagios

This commit implements a prototype for a search dialog

Currently it is limited only to specific fields and only supports services
This is a prototype for testing only
Make unhandled hosts/services configurable

This patch moves the definition of unhandled/open problems
into settings.py

As a side effect of this, definition of unhandled can be overwritten
in adagios.conf by adding these to the config file:

UNHANDLED_SERVICES = {
    'state__isnot': 0,
    'acknowledged': 0,
    'scheduled_downtime_depth': 0,
    'host_state': 0,
    'host_scheduled_downtime_depth': 0,
    'host_acknowledged': 0,
}
UNHANDLED_HOSTS = {
    'state': 1,
    'acknowledged': 0,
    'scheduled_downtime_depth': 0
}

This partially fixes #471 although we are not providing the ability
yet to configure this from the settings web interface.
Merge branch 'master' into advanced-search-dialog
Serverside includes for emails

This patch adds the ability to inject serverside includes in emails
Additionally improves the html in base.html so that it is always clear
what is the name of ssi relevant for current SSI.
Explicitly update globals in context processors

This patch ensures that pynag.Model.cfg_file is always
updated before other context processors are executed.

Fixes #480
Fix typo in status/perfdata2
New endpoint: /objectbrowser/import

Allows importing of objects from a CSV style input

* New view /objectbrowser/import
* Added link to "top-right-cogwheel" called "import objects"
* Primitive duplication support (i.e. refuses to import objects already in config)
* Allows preview of what will be saved

Fixes #382
Merge pull request #477 from opinkerfi/feature-unhandled-is-configurable

Make unhandled hosts/services configurable
Merge pull request #475 from opinkerfi/cleanup-utils_get_xxx

Code cleanup - Refactor utils.get_services()
Merge pull request #476 from opinkerfi/advanced-search-dialog

Advanced search dialog
Merge pull request #479 from opinkerfi/feature-ssi-in-emails

Serverside includes for emails
Merge pull request #481 from opinkerfi/fix-global-variables

Explicitly update globals in context processors
Merge pull request #482 from opinkerfi/fix-typo-in-perfdata2

Fix typo in status/perfdata2
Merge pull request #483 from opinkerfi/feature-import-objects

New endpoint: /objectbrowser/import
Fix missing modals on some views

Move a few modals from base_status.html to base.html
because they were being used on more views than just status
views.

Fixes #377
Merge branch 'fix-missing-modals' of github.com:opinkerfi/adagios into fix-missing-modals