some improvements and fix for unpushed/unpulled commits

Minor fixes should be mostly self-explanatory. 

But the reason to define magit-wash-unpushed-or-unpulled is because it breaks down when commit messages look like this "[ID1][ID2] blah". 

I was unfortunate enough to use such messages and at some point unpushed commits just stopped showing up. After update to recent master version it started giving errors and I was able to track it down. It seems that errors come from unpushed commits generated with "* %h %s" format but parsed with log regexp, which is approximately equal to "%h%d [%an][%ar]%s".