LUN-783 : Enable codemirror for editable smartsnippets

- Enable code mirror for snippets that are not read only
- Enable line wrapping for code mirror so the horizontal scroll bar is not shown
  when code lines are too long
- Preserve snippet varibles automatic addition when pasting snippet code
- Snippet variables are added also as you type
LUN-783 : Refactor code
Merge pull request #28 from pbs/LUN-783

LUN-783 : Enable codemirror for editable smartsnippets