enable rule to be marked as restat or generator

Ninja rules have two special situations, restat and generator. This commit adds support for both of them.