[Application] Add permission storage logic

Permission storage: permissions should be stored in ApplicationData and
eventually the database, so now we have setter and getter in the
ApplicationData class and the actual db operations are done inside
ApplicationStorageImpl. While, there are still some parts missing, like
the session storage which should also be implemented in the Application
calss.
Merge pull request #1545 from mbbill/permission_1

[Application] Add permission storage logic