Merge master changes to upstream

Well, there a lot of changes.
First: I revert previous patch accidentally pushed to upstream and introduce it in this pull request. Now it have commit history and better for git operations or checking. Again, its contents is gl-update branch and some little bugfixes. I reverted UT_NOTIFY changes unc branch introduced.
Second: this patch introduces code style unification in great ammount of commits. It was done by eclipse and K&R builtin style (with only modification - brackets for functions on the new line).