add option to limit job execution dependant on memory consumption (-m)

Setting a value in range [0,100] for -m limits starting of new jobs. once
the limit has been exceeded at most one single job is run at a time.

This aims at C++ make projects that run into memory limitations when
building expensive (in regards to memory) compilation units, e.g. caused
by massive template instantiations.

The implementation currently covers support for Apple, Linux and Windows.

Signed-off-by: Matthias Maennich <matthias@maennich.net>
Change-Id: Ie34add04211c55151c7e1b2ccc5203d5577fd87f
build.py build script

Change-Id: Ic7cc6581e775c048f7b43448f741ebe5b7be98d4
Merge "build.py build script" into ninja-1.5.1
hash based dependency skipping

when a rule specifies "hash_input = 1" in addition to the
modification time of its inputs the hashed content of the
inputs are taken into account. hence a target is only dirty
if the incoming edges (actually leafes) are dirty content-wise.

Change-Id: I372fcbe9a16adbe6caa0828618e0affb55ee0083