Refactored visualizer into a angular directive

This PR relates to issue: https://github.com/jembi/openhim-console/issues/187