Fixing bug '#19 Enable notifications on file upload'. Modified patch #534 to make it actually work on HEAD. Should work for Oracle as well but not tested on that db yet. This could do with some cleanup, and i18n-ization.
fix from Sloan: proc to delete all notifications for a user, which will be used later when we have callbacks to call things like this when we delete a user from core