Disallow user to instantiate Left and Right handlers for MergingEventHandler

Also, some minor refactoring and code cleanup.

PS. MergingEventHandler is currently used only in HashPCA example, which has not been ported to the new REEF API yet, so it is safe to merge the new version of MergingEventHandler into master