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.
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"