improve detection of dependencies installation for mac build
use template generation for build scripts

reason: avoid code duplication.
how to use: go in build_farm directory and run make.
remove usage of git submodule in build scripts

caused too much trouble:
- there were files staged after the operation (which blocked later
  automatic pulls)
- sub-repos were not updated if upstream pushed commits
Merge pull request #71 from duthils/build-farm

Build farm