Notifications System core

Following https://issues.cask.co/browse/CDAP-849 jira and design doc.
Build is running at https://builds.cask.co/browse/CDAP-DUT320-3.
For sure you need to refactor this method. Simply too long and complex (see how deep the indentation is).