Update waf to version 1.7.10 and fix wscript to fit new API

Tested on Gentoo x64 and Windows 7 x86.

> if src/document.h is changed, depending source files

are rebuilt now.