Cleanup of functions.el

Reindentation and whitespace cleaning
Added defadvice for diff-hl

Now automatically re-scans buffers after commits