Merge pull request #14 from wilx/1.1.x

Merge.
Merge pull request #15 from wilx/1.1.x

scripts/prepare_dist_from_git.sh: Check out requested branch and not HEAD.
Merge pull request #17 from wilx/1.1.x

Merge minor post 1.1.3-RC2 changes.
Merge pull request #19 from wilx/1.1.x

thread/syncprims-pub-impl.h: Fix bug #298. -- int to pointer cast error on Xcode 5.1