Add toggle imports in code examples in manual

Pull request contains functionality for showing/hiding import statements in code samples in manual. It does not contain toggling in Javadoc API. It seems that DOM in Javadoc code samples is different and requires different handling. Will add support for Javadoc API in the next pull request.