Remove 'sed' dependency on Windows

Change build.ninja internally, without calling 'sed'. Unfortunately
this makes the code uglier and less elegant than before ...
Merge branch 'bogdanm-remove-sed'