Fixed problems that occur when django is deployed at a non-root url.

Problems which have been fixed include:
- The right side menu pane appeared even in the admin mode.
- The navigation menu items were linked to wrong urls.
- The frontpage link at the top of the admin page were liked to a wrong url.
- Ckeditor was not activated in several admin pages.
- The page layout was broken in several admin pages.
- Numerous behaviors in ckeditor did not work (eg. adding an image)
- After in-line editing a content item, the page was not reloaded properly.