Functional closed sidebar
Adds functionality to include the closed sidebar.
When sidebar is closed the details will be visible once changed in open sidebar.
This MR fixes some bugs and adds some features from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3175
Fixes: #13594 (closed)