Refactored and moved most of the python code in wscript to tools/waf/bdeutil.py.
Changed 'toolchain_features' to use a dictionary instead of an array so that parameters can be passed to functions implementing features.
Added more options.
Bug fixes.
Fixed build. Cleaned up toolchain_features for g++ and msvc.