Review and cleanup of build-release

- Correctly determine the release queue in case of special releases.
- Various clean ups and simplification of the program flow.
Merge pull request #197 from ktf/fix-build-release

Review and cleanup of build-release