Build log write error checking.

Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
Merge pull request #626 from nico/logwrite

Build log write error checking.
Fix the browse tool.

ReadFlags was altering argv in real_main causing us
to pass the wrong value into the NinjaMain constructor.
Fix this by storing the ninja command before real_main
runs.
Use fwrite in the msvc tool instead of printf

This allows wide characters from the compiler to propagate through the
msvc tool.  Similar to ad76e867f782e75e0fed620e7b39f7099af154a9.
Merge pull request #627 from idealisms/master

Fix the browse tool.
Fix tabs/spaces inconsistency.
Merge pull request #631 from kimgr/master

Fix tabs/spaces inconsistency.
Add to .gitignore : SublimeText project files, *.patch files, ..ninja_deps, .ninja_log
Fix for missing "no work to do." message if all build edges are phony rules.
Added NestedPhonyPrintsDone unit test
Merge pull request #633 from rgeary1/NestedPhonyPrintsDone

Fix : Pure nested phony rules do not print "no work to do"
Proof reading
Merge pull request #635 from johan/patch-1

Proof reading
Avoid indexing into an empty string.
Merge branch 'master' into wstr
Fix for incorrect number of total edges in the status message
Merge pull request #639 from rgeary1/StatusMessageFix

Fix for #638 incorrect number of total edges in the status message
Add a test for issue #638.
Merge pull request #640 from nico/edgetest

Add a test for issue #638.
Merge pull request #628 from rnk/wstr

Use fwrite in the msvc tool instead of printf
Minor style fixes, no behavior change.