[backend] add a route to the backend to notify plugins

As multi action support needs nested data structures, make use of JSON
[backend] fix notify functions
[api] remove the configuration option for multiaction_notify_support

The plugins get all the informations now and decide for themselves what
they filter
[api] add a events models - one class per event

The api pulls /lastnotifications from backend and sends its own
events and the backend notifications back to the backend under
[backend] always return from lastnotifications

even with empty results, otherwise the clock daemon will run out of
threads too quickly
[api] replace the average check with a black list

the average is not good enough as measure as removing a one line
function increases the average, which is not what we want to prevent
per se.

Now making functions more complicated than 40 points deserves an
entry in the black list or a thought how to write it differently.

Note that codeclimate already gives a B for one 35 point function :)
[api] create a BranchCommentEvent in the API directly

It's only interesting if the branch command was triggered directly, not
for maintenance
[api] ignore code outside of functions - it's just how rails works