Cleaning up the build toolchain

 * better dependency tracking;
 * smaller Rakefile, configurable things moved to external yml files
 * split most of rake.rb mess into dedicated files.