New version of community (jomsocial) plugin

New pull request against master (K3.0), not develop (K3.1). 

Removes all white space changes from the first commit allowing us to see the real changes made to the code. Updated the code to match our latest code with a few J3.x fixes and other improvements.

Replaces #2539.

Will probably still need some fixes, I'm also going to add some comments to the changes.
I changed the code to send notification only to the subscribers of the topic. The logic we use is a bit more involved and I think that I'm just going to create a new event to send kunena notifications in K3.1 or later.