Implements 'private module' feature to optionally restrict viewing of modules by permission, also some other minor tweaks scraped fromt the container 2.0 project [#880 state:resolved]