fixing swagger page.
integrating with google analytics.
Merge branch 'develop' of https://github.com/lergo/lergo-ri into develop
LERGO-224

 - implemented 'activity based authorization' - using the swagger actions files to map between activity and authorization.
    - the authorization happens in middlewares which are reusable elements across the system.
 - adding middleware support for swagger actions
 - adding prefix '/backend' for swagger - which was part of the path before.. now the documentation will display correctly.
 - fixing swagger ui
 - adding models hierarchy with abstract so we won't have to repeat functions like 'find by id' and 'find' or 'findOne'. added models 'Lesson' and 'User'
 - added folder 'middlewares' with Lessons middlewares and Users middlewares. a lot of action requirements logic was taken outside and into middlewares.
 - manually tested that no major functionality was damaged.
LERGO-224

 - implemented 'activity based authorization' - using the swagger actions files to map between activity and authorization.
    - the authorization happens in middlewares which are reusable elements across the system.
 - adding middleware support for swagger actions
 - adding prefix '/backend' for swagger - which was part of the path before.. now the documentation will display correctly.
 - fixing swagger ui
 - adding models hierarchy with abstract so we won't have to repeat functions like 'find by id' and 'find' or 'findOne'. added models 'Lesson' and 'User'
 - added folder 'middlewares' with Lessons middlewares and Users middlewares. a lot of action requirements logic was taken outside and into middlewares.
 - manually tested that no major functionality was damaged.
Merge branch 'develop' of https://github.com/lergo/lergo-ri into develop
LERGO-224

fixed build.
LERGO-224

sorting out the admin section and edit to lessons.
LERGO-224

creating "permissions" singletons and exposing user's permissions as REST calls.
Merge branch 'develop' of https://github.com/lergo/lergo-ri into develop

Conflicts:
	backend/controllers/UsersController.js
LERGO-224

complete the admin edit lesson.

also removed folder "baseLayout" and made it "partials"

This is still temporary. we need to sort out the templates into folders.