fix and rewrite file change notifications(workInProgress)

some todo left 
users preferances dosen't seem to work
no namespace.
use OC mail function not php one