NR-57 : Basic REST server components for handling gateway

Refactored for a better service security support.
Merge branch '56-design-and-implement-the-security-plugin-API' of dev.sourcefabric.org:ally-py into 56-design-and-implement-the-security-plugin-API