SmartOS fixes, HAProxy 1.5.3, tinc 1.1-git, and some package updates

This is the cleaned-up version of: https://github.com/NixOS/nixpkgs/pull/2117
I think it's very important to not use /bin/sh here, but I think @edolstra may know more on why configure scripts don't have a patched shebang.