Notifications improvements

* Improve/fix some logic determining if notifications should be sent
* Allow notifications to be completely disabled.
Fix usage of count() in if statements
Add "Enable notifications" to settings page
Audit of existing @since PHPDoc tags